Merge branch 'v1.12' of fit2cloud:dataease/dataease into v1.12
This commit is contained in:
commit
5e3c06dc06
@ -22,6 +22,8 @@ public class VAuthModelDTO extends VAuthModelWithBLOBs implements ITreeBase<VAut
|
||||
|
||||
private String innerId;
|
||||
|
||||
private Boolean isPlugin = false;
|
||||
|
||||
public String toString(){
|
||||
return this.getName();
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
<resultMap id="BaseResultMapDTO" type="io.dataease.dto.dataset.DataSetTableDTO"
|
||||
extends="io.dataease.plugins.common.base.mapper.DatasetTableMapper.BaseResultMap">
|
||||
<result column="privileges" property="privileges"/>
|
||||
<result column="sql_variable_details" property="sqlVariableDetails"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
@ -16,7 +17,7 @@
|
||||
<select id="searchOne" resultMap="BaseResultMapDTO">
|
||||
select
|
||||
id, `name`, scene_id, data_source_id, `type`, `mode`,`info`, create_by, create_time,
|
||||
get_auths(id,'dataset',#{userId}) as `privileges`, scene_id as pid
|
||||
get_auths(id,'dataset',#{userId}) as `privileges`, scene_id as pid, sql_variable_details
|
||||
from dataset_table
|
||||
<where>
|
||||
<if test="id != null">
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
type="io.dataease.dto.authModel.VAuthModelDTO">
|
||||
<result column="privileges" jdbcType="VARCHAR" property="privileges"/>
|
||||
<result column="inner_id" jdbcType="VARCHAR" property="innerId"/>
|
||||
<result column="is_plugin" jdbcType="VARCHAR" property="isPlugin"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryAuthModel" resultMap="ExtResultMap">
|
||||
@ -117,7 +118,8 @@
|
||||
panel_view.panel_id AS pid,
|
||||
chart_view.type as 'model_inner_type',
|
||||
'leaf' AS node_type,
|
||||
'view' AS model_type
|
||||
'view' AS model_type,
|
||||
chart_view.is_plugin as 'is_plugin'
|
||||
FROM
|
||||
chart_view
|
||||
LEFT JOIN panel_view ON panel_view.chart_view_id = chart_view.id
|
||||
|
||||
@ -6,6 +6,7 @@ import com.google.gson.reflect.TypeToken;
|
||||
import io.dataease.auth.entity.SysUserEntity;
|
||||
import io.dataease.auth.service.AuthUserService;
|
||||
import io.dataease.commons.model.PluginViewSetImpl;
|
||||
import io.dataease.dto.dataset.SqlVariableDetails;
|
||||
import io.dataease.ext.*;
|
||||
import io.dataease.commons.constants.CommonConstants;
|
||||
import io.dataease.commons.constants.JdbcConstants;
|
||||
@ -645,6 +646,19 @@ public class ChartViewService {
|
||||
if (request.getIsTree() == null) {
|
||||
request.setIsTree(false);
|
||||
}
|
||||
boolean hasParameters = false;
|
||||
if (StringUtils.isNotEmpty(table.getSqlVariableDetails())) {
|
||||
List<SqlVariableDetails> sqlVariables = new Gson().fromJson(table.getSqlVariableDetails(), new TypeToken<List<SqlVariableDetails>>() {}.getType());
|
||||
for (String parameter : Optional.ofNullable(request.getParameters()).orElse(new ArrayList<>()) ) {
|
||||
if (sqlVariables.stream().map(SqlVariableDetails::getVariableName).collect(Collectors.toList()).contains(parameter)) {
|
||||
hasParameters = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(hasParameters){
|
||||
continue;
|
||||
}
|
||||
if (StringUtils.isNotEmpty(fieldId)) {
|
||||
String[] fieldIds = fieldId.split(",");
|
||||
if (request.getIsTree()) {
|
||||
|
||||
@ -106,7 +106,7 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService {
|
||||
tableName = dataTableInfoDTO.getTable();
|
||||
break;
|
||||
case SQL:
|
||||
tableName = dataSetTableService.handleVariableDefaultValue(dataTableInfoDTO.getSql(), pluginViewSet.getSqlVariableDetails());
|
||||
tableName = dataSetTableService.handleVariableDefaultValue(dataTableInfoDTO.getSql(), null);
|
||||
tableName = "(" + tableName + ")";
|
||||
break;
|
||||
case CUSTOM:
|
||||
|
||||
@ -656,7 +656,8 @@ public class DataSetTableService {
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
|
||||
String sql = handleVariableDefaultValue(new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getSql(), datasetTable.getSqlVariableDetails());
|
||||
String sql = handleVariableDefaultValue(new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getSql(), null);
|
||||
|
||||
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
|
||||
datasourceRequest.setQuery(
|
||||
qp.createQuerySQLWithPage(sql, fields, page, pageSize, realSize, false, customFilter));
|
||||
@ -962,22 +963,25 @@ public class DataSetTableService {
|
||||
if (StringUtils.isEmpty(sql)) {
|
||||
DataEaseException.throwException(Translator.get("i18n_sql_not_empty"));
|
||||
}
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Matcher matcher = pattern.matcher(sql);
|
||||
while (matcher.find()) {
|
||||
SqlVariableDetails defaultsSqlVariableDetail = null;
|
||||
List<SqlVariableDetails> defaultsSqlVariableDetails = new Gson().fromJson(sqlVariableDetails, new TypeToken<List<SqlVariableDetails>>() {
|
||||
}.getType());
|
||||
for (SqlVariableDetails sqlVariableDetail : defaultsSqlVariableDetails) {
|
||||
if (matcher.group().substring(2, matcher.group().length() - 1).equalsIgnoreCase(sqlVariableDetail.getVariableName())) {
|
||||
defaultsSqlVariableDetail = sqlVariableDetail;
|
||||
break;
|
||||
if(sqlVariableDetails != null){
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Matcher matcher = pattern.matcher(sql);
|
||||
while (matcher.find()) {
|
||||
SqlVariableDetails defaultsSqlVariableDetail = null;
|
||||
List<SqlVariableDetails> defaultsSqlVariableDetails = new Gson().fromJson(sqlVariableDetails, new TypeToken<List<SqlVariableDetails>>() {
|
||||
}.getType());
|
||||
for (SqlVariableDetails sqlVariableDetail : defaultsSqlVariableDetails) {
|
||||
if (matcher.group().substring(2, matcher.group().length() - 1).equalsIgnoreCase(sqlVariableDetail.getVariableName())) {
|
||||
defaultsSqlVariableDetail = sqlVariableDetail;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (defaultsSqlVariableDetail != null && StringUtils.isNotEmpty(defaultsSqlVariableDetail.getDefaultValue())) {
|
||||
sql = sql.replace(matcher.group(), defaultsSqlVariableDetail.getDefaultValue());
|
||||
}
|
||||
}
|
||||
if (defaultsSqlVariableDetail != null && StringUtils.isNotEmpty(defaultsSqlVariableDetail.getDefaultValue())) {
|
||||
sql = sql.replace(matcher.group(), defaultsSqlVariableDetail.getDefaultValue());
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
sql = removeVariables(sql);
|
||||
} catch (Exception e) {
|
||||
@ -1685,7 +1689,7 @@ public class DataSetTableService {
|
||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||
datasourceRequest.setDatasource(ds);
|
||||
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
|
||||
String sql = handleVariableDefaultValue(new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getSql(), datasetTable.getSqlVariableDetails());
|
||||
String sql = handleVariableDefaultValue(new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getSql(), null);
|
||||
String sqlAsTable = qp.createSQLPreview(sql, null);
|
||||
datasourceRequest.setQuery(sqlAsTable);
|
||||
fields = datasourceProvider.fetchResultField(datasourceRequest);
|
||||
|
||||
@ -372,6 +372,7 @@ public class PanelGroupService {
|
||||
String templateData = null;
|
||||
String dynamicData = null;
|
||||
String staticResource = null;
|
||||
Boolean mobileLayout = false;
|
||||
if (PanelConstants.NEW_PANEL_FROM.NEW.equals(newFrom)) {
|
||||
// do nothing
|
||||
} else {
|
||||
@ -381,11 +382,13 @@ public class PanelGroupService {
|
||||
templateStyle = panelTemplate.getTemplateStyle();
|
||||
templateData = panelTemplate.getTemplateData();
|
||||
dynamicData = panelTemplate.getDynamicData();
|
||||
mobileLayout = panelViewService.havaMobileLayout(templateData);
|
||||
} else if (PanelConstants.NEW_PANEL_FROM.NEW_OUTER_TEMPLATE.equals(newFrom)) {
|
||||
templateStyle = request.getPanelStyle();
|
||||
templateData = request.getPanelData();
|
||||
dynamicData = request.getDynamicData();
|
||||
staticResource = request.getStaticResource();
|
||||
mobileLayout = panelViewService.havaMobileLayout(templateData);
|
||||
}
|
||||
Map<String, String> dynamicDataMap = gson.fromJson(dynamicData, Map.class);
|
||||
List<PanelViewInsertDTO> panelViews = new ArrayList<>();
|
||||
@ -418,6 +421,7 @@ public class PanelGroupService {
|
||||
request.setId(newPanelId);
|
||||
request.setCreateTime(System.currentTimeMillis());
|
||||
request.setCreateBy(AuthUtils.getUser().getUsername());
|
||||
request.setMobileLayout(mobileLayout);
|
||||
return newPanelId;
|
||||
}
|
||||
|
||||
|
||||
@ -133,6 +133,21 @@ public class PanelViewService {
|
||||
return viewIds;
|
||||
}
|
||||
|
||||
public Boolean havaMobileLayout(String panelData){
|
||||
Boolean mobileLayout = false;
|
||||
if (StringUtils.isNotEmpty(panelData)) {
|
||||
JsonArray dataArray = JsonParser.parseString(panelData).getAsJsonArray();
|
||||
for (int i = 0; i < dataArray.size(); i++) {
|
||||
JsonObject jsonObject = dataArray.get(i).getAsJsonObject();
|
||||
if (jsonObject.get("mobileSelected") != null && jsonObject.get("mobileSelected").getAsBoolean()) {
|
||||
mobileLayout = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return mobileLayout;
|
||||
}
|
||||
|
||||
public List<PanelViewTableDTO> detailList(String panelId) {
|
||||
return extPanelViewMapper.getPanelViewDetails(panelId);
|
||||
}
|
||||
|
||||
@ -65,3 +65,33 @@ CREATE TABLE `sys_user_assist` (
|
||||
`need_first_noti` bit(1) DEFAULT NULL COMMENT '是否需要首登提示',
|
||||
PRIMARY KEY (`user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `v_history_chart_view` AS SELECT
|
||||
`chart_group`.`id` AS `id`,
|
||||
`chart_group`.`id` AS `inner_id`,
|
||||
`chart_group`.`name` AS `NAME`,
|
||||
`chart_group`.`name` AS `label`,
|
||||
`chart_group`.`pid` AS `pid`,
|
||||
`chart_group`.`type` AS `model_inner_type`,
|
||||
'spine' AS `node_type`,
|
||||
'view' AS `model_type`,
|
||||
1 AS `mode`,
|
||||
0 AS `is_plugin`
|
||||
FROM
|
||||
`chart_group` UNION ALL
|
||||
SELECT DISTINCT
|
||||
`chart_view`.`id` AS `id`,
|
||||
`chart_view`.`id` AS `inner_id`,
|
||||
`chart_view`.`name` AS `NAME`,
|
||||
`chart_view`.`name` AS `label`,
|
||||
`chart_view`.`scene_id` AS `pid`,
|
||||
`chart_view`.`type` AS `model_inner_type`,
|
||||
'leaf' AS `node_type`,
|
||||
'view' AS `model_type`,
|
||||
1 AS `mode`,
|
||||
`chart_view`.`is_plugin` AS `is_plugin`
|
||||
FROM
|
||||
`chart_view`
|
||||
WHERE
|
||||
( `chart_view`.`chart_type` = 'public' );
|
||||
|
||||
32
frontend/src/components/DeViewSelect/dom.js
Normal file
32
frontend/src/components/DeViewSelect/dom.js
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
export const on = (function() {
|
||||
if (document.addEventListener) {
|
||||
return function(element, event, handler) {
|
||||
if (element && event && handler) {
|
||||
element.addEventListener(event, handler, false)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return function(element, event, handler) {
|
||||
if (element && event && handler) {
|
||||
element.attachEvent('on' + event, handler)
|
||||
}
|
||||
}
|
||||
}
|
||||
})()
|
||||
export const off = (function() {
|
||||
if (document.removeEventListener) {
|
||||
return function(element, event, handler) {
|
||||
if (element && event) {
|
||||
element.removeEventListener(event, handler, false)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return function(element, event, handler) {
|
||||
if (element && event) {
|
||||
element.detachEvent('on' + event, handler)
|
||||
}
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
||||
226
frontend/src/components/DeViewSelect/index.vue
Normal file
226
frontend/src/components/DeViewSelect/index.vue
Normal file
@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<div class="el-view-select" :class="selectClass">
|
||||
<el-select
|
||||
ref="select"
|
||||
v-model="innerValues"
|
||||
v-popover:popover
|
||||
:title="labels"
|
||||
popper-class="view-select-option"
|
||||
style="width: 100%;"
|
||||
multiple
|
||||
clearable
|
||||
@remove-tag="_selectRemoveTag"
|
||||
@clear="_selectClearFun"
|
||||
@focus="_popoverShowFun"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectedViews"
|
||||
:key="item.viewId"
|
||||
:label="item.title"
|
||||
:value="item.viewId"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<el-popover ref="popover" v-model="visible" :placement="placement" :transition="transition" :popper-class="popperClass" :width="width" trigger="click">
|
||||
<el-scrollbar tag="div" wrap-class="el-select-dropdown__wrap" view-class="el-select-dropdown__list" class="is-empty">
|
||||
<div :style="{'height': panelHeight + 'px'}">
|
||||
<Preview
|
||||
v-if="viewLoaded"
|
||||
:component-data="componentData"
|
||||
:canvas-style-data="canvasStyleData"
|
||||
:panel-info="panelInfo"
|
||||
:show-position="showPosition"
|
||||
/>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { on, off } from './dom'
|
||||
import Preview from '@/components/canvas/components/Editor/Preview'
|
||||
export default {
|
||||
name: 'DeViewSelect',
|
||||
components: { Preview },
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
viewLoaded: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
viewPropData: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
labels: [],
|
||||
visible: false,
|
||||
placement: 'bottom',
|
||||
transition: 'el-zoom-in-top',
|
||||
width: 500,
|
||||
selectClass: 'my-top-class',
|
||||
innerValues: [],
|
||||
panelHeight: 450,
|
||||
showPosition: 'email-task'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
popperClass() {
|
||||
const _c = 'el-view-select-popper ' + this.popoverClass
|
||||
return this.disabled ? _c + ' disabled ' : _c
|
||||
},
|
||||
componentData() {
|
||||
return this.viewLoaded && this.viewPropData && this.viewPropData.componentData || null
|
||||
},
|
||||
canvasStyleData() {
|
||||
return this.viewLoaded && this.viewPropData && this.viewPropData.canvasStyleData || null
|
||||
},
|
||||
panelInfo() {
|
||||
return this.viewLoaded && this.viewPropData && this.viewPropData.panelInfo || null
|
||||
},
|
||||
panelId() {
|
||||
return this.viewLoaded && this.panelInfo && this.panelInfo.id
|
||||
},
|
||||
|
||||
selectedViews() {
|
||||
return this.$store.getters.panelViews[this.panelId]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(val, old) {
|
||||
this.innerValues = val
|
||||
},
|
||||
innerValues(val, old) {
|
||||
if (val !== old) {
|
||||
this.$emit('input', val)
|
||||
}
|
||||
},
|
||||
panelId(val, old) {
|
||||
if (val !== old) { this.$store.dispatch('panel/setPanelInfo', this.panelInfo) }
|
||||
},
|
||||
selectedViews: {
|
||||
handler(val) {
|
||||
if (!this.viewLoaded) return
|
||||
if (!val || !JSON.stringify(val)) {
|
||||
this.labels = []
|
||||
this.innerValues = []
|
||||
return
|
||||
}
|
||||
const views = JSON.parse(JSON.stringify(val))
|
||||
const viewIds = []
|
||||
const names = []
|
||||
views.forEach(item => {
|
||||
viewIds.push(item.viewId)
|
||||
names.push(item.title)
|
||||
})
|
||||
this.innerValues = JSON.parse(JSON.stringify(viewIds))
|
||||
this.labels = JSON.parse(JSON.stringify(names))
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this._updateH()
|
||||
this.$nextTick(() => {
|
||||
on(document, 'mouseup', this._popoverHideFun)
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
off(document, 'mouseup', this._popoverHideFun)
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 更新宽度
|
||||
_updateH() {
|
||||
this.$nextTick(() => {
|
||||
this.width = this.$refs.select.$el.getBoundingClientRect().width
|
||||
this.panelHeight = this.width * 9 / 16
|
||||
})
|
||||
},
|
||||
// 显示弹出框的时候容错,查看是否和el宽度一致
|
||||
_popoverShowFun(val) {
|
||||
this._updateH()
|
||||
this.$emit('onFoucs')
|
||||
},
|
||||
// 判断是否隐藏弹出框
|
||||
_popoverHideFun(e) {
|
||||
const path = this._getEventPath(e)
|
||||
const isInside = path.some(list => {
|
||||
// 鼠标在弹出框内部,阻止隐藏弹出框
|
||||
return list.className && typeof list.className === 'string' && list.className.indexOf('el-view-select') !== -1
|
||||
})
|
||||
if (!isInside) {
|
||||
this.visible = false
|
||||
}
|
||||
},
|
||||
// 获取MouseEvent.path 针对浏览器兼容性兼容ie11,edge,chrome,firefox,safari
|
||||
_getEventPath(evt) {
|
||||
const path = (evt.composedPath && evt.composedPath()) || evt.path
|
||||
const target = evt.target
|
||||
if (path != null) {
|
||||
return path.indexOf(window) < 0 ? path.concat(window) : path
|
||||
}
|
||||
if (target === window) {
|
||||
return [window]
|
||||
}
|
||||
function getParents(node, memo) {
|
||||
memo = memo || []
|
||||
const parentNode = node.parentNode
|
||||
if (!parentNode) {
|
||||
return memo
|
||||
} else {
|
||||
return getParents(parentNode, memo.concat(parentNode))
|
||||
}
|
||||
}
|
||||
return [target].concat(getParents(target), window)
|
||||
},
|
||||
_selectRemoveTag(viewId) {
|
||||
this.selectedViews.forEach(item => {
|
||||
if (item.viewId === viewId) {
|
||||
this.$store.dispatch('task/delView', { 'panelId': this.panelId, 'viewId': item.viewId })
|
||||
}
|
||||
})
|
||||
},
|
||||
_selectClearFun() {
|
||||
const views = JSON.parse(JSON.stringify(this.selectedViews))
|
||||
views.forEach(item => {
|
||||
this.$store.dispatch('task/delView', { 'panelId': this.panelId, 'viewId': item.viewId })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-view-select .view-select-option {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.el-view-select-popper {
|
||||
max-height: 800px;
|
||||
overflow: auto;
|
||||
}
|
||||
.el-view-select-popper.disabled {
|
||||
display: none !important;
|
||||
}
|
||||
.el-view-select-popper .el-button--small {
|
||||
width: 25px !important;
|
||||
min-width: 25px !important;
|
||||
}
|
||||
|
||||
.el-view-select-popper[x-placement^='bottom'] {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.my-top-class {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@ -16,6 +16,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { handlerInputStyle } from '@/components/widget/DeWidget/serviceNameFn.js'
|
||||
|
||||
import { uuid } from 'vue-uuid'
|
||||
export default {
|
||||
name: 'ElVisualSelect',
|
||||
@ -106,12 +108,19 @@ export default {
|
||||
}
|
||||
this.options = this.newList.slice(0, this.maxLength)
|
||||
},
|
||||
|
||||
customInputStyle() {
|
||||
if (!this.$parent.$parent.handlerInputStyle) return;
|
||||
handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-input__inner'), this.$parent.element.style)
|
||||
handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-select__input'), {wordColor: this.$parent.element.style.wordColor})
|
||||
},
|
||||
init() {
|
||||
if (this.defaultFirst && this.list.length > 0) {
|
||||
this.selectValue = this.list[0].value
|
||||
}
|
||||
if (!this.list || !this.list.length) return
|
||||
if (!this.list || !this.list.length) {
|
||||
this.customInputStyle()
|
||||
return
|
||||
}
|
||||
|
||||
const selectDom = document.querySelector(
|
||||
`.${this.classId} .el-select-dropdown .el-select-dropdown__wrap`
|
||||
@ -126,6 +135,7 @@ export default {
|
||||
this.addScrollDiv(this.slectBoxDom)
|
||||
|
||||
this.scrollFn()
|
||||
this.customInputStyle()
|
||||
},
|
||||
|
||||
scrollFn() {
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
:is="config.component"
|
||||
v-else
|
||||
ref="wrapperChild"
|
||||
class="component"
|
||||
:out-style="config.style"
|
||||
:style="getComponentStyleDefault(config.style)"
|
||||
:prop-value="config.propValue"
|
||||
@ -149,7 +150,7 @@ export default {
|
||||
return style
|
||||
},
|
||||
componentActiveFlag() {
|
||||
return (this.curComponent && this.config === this.curComponent) && !this.previewVisible && !this.showPosition.includes('multiplexing')
|
||||
return (this.curComponent && this.config === this.curComponent) && !this.previewVisible && !this.showPosition.includes('multiplexing') && !this.showPosition.includes('email-task')
|
||||
},
|
||||
curGap() {
|
||||
return (this.canvasStyleData.panel.gap === 'yes' && this.config.auxiliaryMatrix) ? this.componentGap : 0
|
||||
@ -215,7 +216,11 @@ export default {
|
||||
height: '100%'
|
||||
}
|
||||
} else {
|
||||
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
|
||||
return {
|
||||
...
|
||||
getStyle(style, ['top', 'left', 'width', 'height', 'rotate']),
|
||||
position: 'relative'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -268,4 +273,7 @@ export default {
|
||||
.main_view{
|
||||
background-size: 100% 100%!important;
|
||||
}
|
||||
.component{
|
||||
//position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -198,7 +198,7 @@ export default {
|
||||
},
|
||||
edit() {
|
||||
if (this.curComponent.type === 'custom') {
|
||||
bus.$emit('component-dialog-edit')
|
||||
bus.$emit('component-dialog-edit', 'update')
|
||||
} else if (this.curComponent.type === 'v-text' || this.curComponent.type === 'de-rich-text' || this.curComponent.type === 'rect-shape') {
|
||||
bus.$emit('component-dialog-style')
|
||||
} else { bus.$emit('change_panel_right_draw', true) }
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="bar-main">
|
||||
<div v-if="!positionCheck('multiplexing')">
|
||||
<div v-if="!positionCheck('multiplexing') && !positionCheck('email-task')">
|
||||
<span v-if="isEdit" :title="$t('panel.edit')">
|
||||
<i class="icon iconfont icon-edit" @click.stop="edit" />
|
||||
</span>
|
||||
@ -14,6 +14,9 @@
|
||||
<div v-if="positionCheck('multiplexing')" style="margin-right: -1px;width: 18px;z-index: 5">
|
||||
<el-checkbox v-model="multiplexingCheckModel" size="medium" @change="multiplexingCheck" />
|
||||
</div>
|
||||
<div v-if="positionCheck('email-task')" style="margin-right: -1px;width: 18px;z-index: 5">
|
||||
<el-checkbox v-model="isTaskChecked" size="medium" @change="emailTaskCheck" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -40,6 +43,14 @@ export default {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'NotProvided'
|
||||
},
|
||||
panelId: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
chartTitle: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -51,7 +62,8 @@ export default {
|
||||
'view',
|
||||
'custom'
|
||||
],
|
||||
timer: null
|
||||
timer: null,
|
||||
isTaskChecked: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -67,14 +79,29 @@ export default {
|
||||
'linkageSettingStatus',
|
||||
'componentData',
|
||||
'canvasStyleData',
|
||||
'componentGap'
|
||||
])
|
||||
'componentGap',
|
||||
'panelViews'
|
||||
]),
|
||||
|
||||
taskChecked() {
|
||||
const panelId = this.panelId
|
||||
return !!this.panelViews && !!this.panelViews[panelId] && !!this.panelViews[panelId].some(view => view.viewId === this.viewId)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
taskChecked(val) {
|
||||
this.isTaskChecked = val
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.showPosition === 'multiplexing-view') {
|
||||
this.multiplexingCheckModel = true
|
||||
this.multiplexingCheck(this.multiplexingCheckModel)
|
||||
}
|
||||
if (this.showPosition === 'email-task') {
|
||||
this.isTaskChecked = !!this.taskChecked
|
||||
// this.emailTaskCheck(this.isTaskChecked)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
},
|
||||
@ -104,6 +131,13 @@ export default {
|
||||
// remove
|
||||
this.$store.commit('removeCurMultiplexingComponentWithId', this.viewId)
|
||||
}
|
||||
},
|
||||
emailTaskCheck(val) {
|
||||
if (val) {
|
||||
this.$store.dispatch('task/addView', { 'panelId': this.panelId, 'viewId': this.viewId, 'title': this.chartTitle })
|
||||
} else {
|
||||
this.$store.dispatch('task/delView', { 'panelId': this.panelId, 'viewId': this.viewId })
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ export default {
|
||||
methods: {
|
||||
edit() {
|
||||
if (this.curComponent.type === 'custom') {
|
||||
bus.$emit('component-dialog-edit')
|
||||
bus.$emit('component-dialog-edit', 'update')
|
||||
} else if (this.curComponent.type === 'v-text' || this.curComponent.type === 'de-rich-text' || this.curComponent.type === 'rect-shape') {
|
||||
bus.$emit('component-dialog-style')
|
||||
} else { bus.$emit('change_panel_right_draw', true) }
|
||||
|
||||
@ -1681,6 +1681,7 @@ export default {
|
||||
outline: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
<div class="switch-position">
|
||||
<el-radio-group v-model="mobileLayoutInitStatus" size="mini" @change="openMobileLayout">
|
||||
<el-radio-button :label="false">
|
||||
<svg-icon icon-class="icon_pc_outlined" class="toolbar-icon-active text16" />
|
||||
<span class="icon iconfont icon-icon_pc_outlined icon16_only" />
|
||||
</el-radio-button>
|
||||
<el-radio-button :label="true">
|
||||
<svg-icon icon-class="icon_phone_outlined" class="toolbar-icon-active text16" />
|
||||
<span class="icon iconfont icon-icon_phone_outlined icon16_only" />
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
@ -47,14 +47,14 @@
|
||||
<el-divider style="margin-left: 20px" direction="vertical" />
|
||||
<span class="button_self">
|
||||
<el-dropdown :hide-on-click="false" trigger="click" placement="bottom-start">
|
||||
<span class="icon iconfont icon-gengduo insert margin-right20">
|
||||
<span class="icon iconfont icon-icon-more insert margin-right20">
|
||||
<span class="icon-font-margin">{{ $t('panel.more') }}</span>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item>
|
||||
<el-dropdown placement="right-start">
|
||||
<span>
|
||||
<svg-icon icon-class="icon_moments-categories_outlined" class="toolbar-icon-active text16" @click="clickPreview" />
|
||||
<span class="icon iconfont icon-icon_moments-categories_outlined icon16" />
|
||||
<span class="text14 margin-left8">{{ $t('panel.new_element_distribution') }}</span>
|
||||
<svg-icon icon-class="icon_right_outlined" class="icon16 margin-left8" />
|
||||
</span>
|
||||
@ -71,25 +71,25 @@
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<svg-icon icon-class="icon_dialpad_outlined" class="icon16" />
|
||||
<span class="icon iconfont icon-icon_dialpad_outlined icon16" />
|
||||
<span class="text14 margin-left8">{{ $t('panel.aided_grid') }}</span>
|
||||
<el-switch v-model="showGridSwitch" class="margin-left8" size="mini" @change="showGridChange" />
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="openOuterParamsSet">
|
||||
<svg-icon icon-class="icon-quicksetting" class="icon16" />
|
||||
<span class="icon iconfont icon-icon-quicksetting icon16" />
|
||||
<span class="text14 margin-left8">{{ $t('panel.params_setting') }}</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="clearCanvas">
|
||||
<svg-icon icon-class="icon_clear_outlined" class="icon16" />
|
||||
<span class="icon iconfont icon-icon_clear_outlined icon16" />
|
||||
<span class="text14 margin-left8">{{ $t('panel.clean_canvas') }}</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
<span class="icon iconfont icon-magic-line insert margin-right20" @click="showPanel">
|
||||
<span class="icon iconfont icon-icon_effects_outlined insert margin-right20" @click="showPanel">
|
||||
<span class="icon-font-margin">{{ $t('panel.panel_style') }}</span>
|
||||
</span>
|
||||
<span class="icon iconfont icon-piliang-copy insert margin-right20" @click="batchOption"><span
|
||||
<span class="icon iconfont icon-icon_Batch_outlined insert margin-right20" @click="batchOption"><span
|
||||
class="icon-font-margin"
|
||||
>{{ $t('panel.batch_opt') }}</span></span>
|
||||
<span style="float: right;margin-right: 24px">
|
||||
@ -137,9 +137,6 @@ import { deepCopy, mobile2MainCanvas } from '@/components/canvas/utils/utils'
|
||||
import { panelUpdate } from '@/api/panel/panel'
|
||||
import { saveLinkage, getPanelAllLinkageInfo } from '@/api/panel/linkage'
|
||||
import bus from '@/utils/bus'
|
||||
import {
|
||||
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||
} from '@/views/panel/panel'
|
||||
import { queryPanelJumpInfo } from '@/api/panel/linkJump'
|
||||
|
||||
export default {
|
||||
@ -332,8 +329,6 @@ export default {
|
||||
},
|
||||
|
||||
save(withClose) {
|
||||
// 清理联动信息
|
||||
this.$store.commit('clearPanelLinkageInfo')
|
||||
// 保存到数据库
|
||||
const requestInfo = {
|
||||
id: this.panelInfo.id,
|
||||
@ -342,6 +337,10 @@ export default {
|
||||
}
|
||||
const components = deepCopy(this.componentData)
|
||||
components.forEach(view => {
|
||||
// 清理联动信息
|
||||
if (view.linkageFilters && view.linkageFilters.length > 0) {
|
||||
view.linkageFilters.splice(0, view.linkageFilters.length)
|
||||
}
|
||||
if (view.DetailAreaCode) {
|
||||
view.DetailAreaCode = null
|
||||
}
|
||||
@ -372,7 +371,6 @@ export default {
|
||||
},
|
||||
clearCanvas() {
|
||||
this.$store.commit('setComponentData', [])
|
||||
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE_STRING)
|
||||
this.$store.commit('recordSnapshot', 'clearCanvas')
|
||||
this.$store.commit('setInEditorStatus', false)
|
||||
},
|
||||
@ -594,7 +592,7 @@ export default {
|
||||
.switch-position {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 50%;
|
||||
left: 48%;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
@ -708,8 +706,12 @@ export default {
|
||||
color: var(--TextPrimary, #1F2329);
|
||||
}
|
||||
|
||||
.icon16_only {
|
||||
font-size: 16px!important;
|
||||
}
|
||||
|
||||
.icon16 {
|
||||
font-size: 16px;
|
||||
font-size: 16px!important;
|
||||
color: var(--TextPrimary, #1F2329);
|
||||
}
|
||||
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
v-if="editBarViewShowFlag"
|
||||
:element="element"
|
||||
:show-position="showPosition"
|
||||
:panel-id="panelInfo.id"
|
||||
:chart-title="chart.title || chart.name"
|
||||
:is-edit="isEdit"
|
||||
:view-id="element.propValue.viewId"
|
||||
@showViewDetails="openChartDetailsDialog"
|
||||
@ -234,7 +236,7 @@ export default {
|
||||
}
|
||||
},
|
||||
editBarViewShowFlag() {
|
||||
return (this.active && this.inTab && !this.mobileLayoutStatus) || this.showPosition.includes('multiplexing')
|
||||
return (this.active && this.inTab && !this.mobileLayoutStatus) || this.showPosition.includes('multiplexing') || this.showPosition.includes('email-task')
|
||||
},
|
||||
charViewShowFlag() {
|
||||
return this.httpRequest.status && this.chart.type && !this.chart.type.includes('table') && !this.chart.type.includes('text') && this.chart.type !== 'label' && this.renderComponent() === 'echarts'
|
||||
@ -858,6 +860,9 @@ export default {
|
||||
this.sourceCustomStyleStr = this.chart.customStyle
|
||||
if (this.componentViewsData[this.chart.id]) {
|
||||
this.componentViewsData[this.chart.id]['title'] = this.chart.title
|
||||
if (param.refreshProp) {
|
||||
this.componentViewsData[this.chart.id][param.refreshProp] = this.chart[param.refreshProp]
|
||||
}
|
||||
}
|
||||
this.mergeScale()
|
||||
}
|
||||
|
||||
@ -17,15 +17,21 @@ export default {
|
||||
left: 0
|
||||
},
|
||||
x: 1,
|
||||
y: 108,
|
||||
y: 216,
|
||||
sizex: 48,
|
||||
sizey: 24
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
copyMultiplexingComponents(state) {
|
||||
let pYMax = 0
|
||||
const _this = this
|
||||
state.isCut = false
|
||||
state.componentData.forEach(item => {
|
||||
if (item.y > pYMax) {
|
||||
pYMax = item.y
|
||||
}
|
||||
})
|
||||
const canvasStyleData = state.canvasStyleData
|
||||
const curCanvasScale = state.curCanvasScale
|
||||
const componentGap = state.componentGap
|
||||
@ -33,7 +39,7 @@ export default {
|
||||
const component =
|
||||
{
|
||||
...deepCopy(state.curMultiplexingComponents[viewId]),
|
||||
...deepCopy(state.viewBase),
|
||||
...deepCopy(deepCopy(state.viewBase)),
|
||||
'auxiliaryMatrix': canvasStyleData.auxiliaryMatrix
|
||||
}
|
||||
|
||||
@ -43,6 +49,8 @@ export default {
|
||||
const width = component.sizex * curCanvasScale.matrixStyleOriginWidth
|
||||
// 取余 平铺4个 此处x 位置偏移
|
||||
component.x = component.x + component.sizex * tilePosition
|
||||
// Y 方向根据当前应该放置的最大值 加上50矩阵余量
|
||||
component.y = pYMax + 50 + state.viewBase.sizex * divisiblePosition
|
||||
component.style.left = (component.x - 1) * curCanvasScale.matrixStyleOriginWidth
|
||||
component.style.top = (component.y - 1) * curCanvasScale.matrixStyleOriginHeight
|
||||
component.style.width = width
|
||||
@ -85,17 +93,7 @@ export default {
|
||||
data.style.top += 20
|
||||
data.style.left += 20
|
||||
}
|
||||
|
||||
// if (isMouse) {
|
||||
// data.style.top = state.menuTop
|
||||
// data.style.left = state.menuLeft
|
||||
// } else {
|
||||
// data.style.top += 10
|
||||
// data.style.left += 10
|
||||
// }
|
||||
|
||||
data.id = generateID()
|
||||
|
||||
// 如果是用户视图 测先进行底层复制
|
||||
if (data.type === 'view') {
|
||||
chartCopy(data.propValue.viewId, state.panel.panelInfo.id).then(res => {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { sin, cos } from '@/components/canvas/utils/translate'
|
||||
import store from '@/store'
|
||||
import { colorReverse } from '@/components/canvas/utils/utils'
|
||||
|
||||
import Vue from 'vue'
|
||||
export const LIGHT_THEME_COLOR_MAIN = '#000000'
|
||||
export const LIGHT_THEME_COLOR_SLAVE1 = '#CCCCCC'
|
||||
export const LIGHT_THEME_PANEL_BACKGROUND = '#F1F3F5'
|
||||
@ -115,8 +114,6 @@ export const customAttrTrans = {
|
||||
'quotaFontSize',
|
||||
'spaceSplit', // 间隔
|
||||
'scatterSymbolSize', // 气泡大小,散点图
|
||||
'treemapWidth', // 矩形树图
|
||||
'treemapHeight',
|
||||
'radarSize'// 雷达占比
|
||||
],
|
||||
'label': [
|
||||
@ -218,9 +215,6 @@ export const THEME_STYLE_TRANS_MAIN = {
|
||||
},
|
||||
'split': {
|
||||
'name': ['color'],
|
||||
'axisLine': {
|
||||
'lineStyle': ['color']
|
||||
},
|
||||
'axisTick': {
|
||||
'lineStyle': ['color']
|
||||
},
|
||||
@ -247,6 +241,9 @@ export const THEME_STYLE_TRANS_SLAVE1 = {
|
||||
'split': {
|
||||
'splitLine': {
|
||||
'lineStyle': ['color']
|
||||
},
|
||||
'axisLine': {
|
||||
'lineStyle': ['color']
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -352,7 +349,7 @@ export function adaptCurThemeCommonStyle(component) {
|
||||
if (isFilterComponent(component.component)) {
|
||||
const filterStyle = store.state.canvasStyleData.chartInfo.filterStyle
|
||||
for (const styleKey in filterStyle) {
|
||||
component.style[styleKey] = filterStyle[styleKey]
|
||||
Vue.set(component.style, styleKey, filterStyle[styleKey])
|
||||
}
|
||||
} else {
|
||||
if (component.style.color) {
|
||||
|
||||
@ -240,6 +240,12 @@ export default {
|
||||
},
|
||||
visualChange(value) {
|
||||
this.value = value
|
||||
this.$nextTick(() => {
|
||||
if (!this.element.options.attrs.multiple) {
|
||||
return
|
||||
}
|
||||
this.handleElTagStyle()
|
||||
})
|
||||
},
|
||||
changeValue(value) {
|
||||
if (!this.inDraw) {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
@check="changeCheckNode"
|
||||
@select-clear="selectClear"
|
||||
@onFoucs="onFoucs"
|
||||
@treeCheckChange="change"
|
||||
@treeCheckChange="handleElTagStyle"
|
||||
/>
|
||||
|
||||
</template>
|
||||
@ -221,7 +221,7 @@ export default {
|
||||
this.handleCoustomStyle()
|
||||
})
|
||||
},
|
||||
change() {
|
||||
handleElTagStyle() {
|
||||
setTimeout(() => {
|
||||
textSelectWidget(this.$refs.deSelectTree.$refs.select.$el, this.element.style)
|
||||
}, 50)
|
||||
@ -383,8 +383,21 @@ export default {
|
||||
.el-tree {
|
||||
background: var(--BgSelectTreeColor, #FFFFFF) !important;
|
||||
color: var(--SelectTreeColor, #606266) !important;
|
||||
|
||||
.el-tree-node.is-current {
|
||||
background-color: rgb(245, 247, 250, .5) !important;
|
||||
}
|
||||
.el-tree-node:focus>.el-tree-node__content {
|
||||
background-color: rgb(245, 247, 250, .5) !important;
|
||||
}
|
||||
|
||||
.el-tree-node__content:hover {
|
||||
background-color: rgb(245, 247, 250, .5) !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.el-input-group--append {
|
||||
.el-input__inner {
|
||||
background: var(--BgSelectTreeColor, #FFFFFF) !important;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// 通过控制css变量控制过滤组件弹框样式 de-select-grid除外
|
||||
import { attrsMap, styleAttrs } from '@/components/widget/DeWidget/serviceNameFn.js'
|
||||
import { attrsMap, styleAttrs } from '@/components/widget/DeWidget/serviceNameFn.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -16,6 +16,25 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cssArr: {
|
||||
handler() {
|
||||
if (['de-select', 'de-select-tree'].includes(this.element.component)) {
|
||||
if (!this.element.options.attrs.multiple) {
|
||||
return
|
||||
}
|
||||
this.handleElTagStyle()
|
||||
};
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
cssArr() {
|
||||
const { brColor, wordColor, innerBgColor } = this.element.style;
|
||||
return { brColor, wordColor, innerBgColor }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.handleCoustomStyle()
|
||||
},
|
||||
@ -32,7 +51,7 @@ export default {
|
||||
const newValue = { brColor, wordColor, innerBgColor };
|
||||
const cssVar = this.typeTransform();
|
||||
this.styleAttrs.forEach((ele, index) => {
|
||||
document.documentElement.style.setProperty(cssVar[index], !isPanelDe ? '' : newValue[ele])
|
||||
document.documentElement.style.setProperty(cssVar[index], !isPanelDe ? '' : newValue[ele])
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@ -73,6 +73,13 @@ function textSelectWidget(nodeCache, style) {
|
||||
}
|
||||
}
|
||||
|
||||
function handlerInputStyle (node, style) {
|
||||
if (!node) return;
|
||||
styleAttrs.forEach(ele => {
|
||||
node.style[attrsMap[ele]] = style[ele];
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
attrsMap,
|
||||
styleAttrs,
|
||||
@ -80,5 +87,6 @@ export {
|
||||
textInputWidget,
|
||||
textSelectGridWidget,
|
||||
textSelectTreeWidget,
|
||||
textSelectWidget
|
||||
textSelectWidget,
|
||||
handlerInputStyle,
|
||||
}
|
||||
@ -30,6 +30,7 @@ const getters = {
|
||||
uiInfo: state => state.user.uiInfo,
|
||||
conditions: state => state.conditions.conditions,
|
||||
msgTypes: state => state.msg.msgTypes,
|
||||
geoMap: state => state.map.geoMap
|
||||
geoMap: state => state.map.geoMap,
|
||||
panelViews: state => state.task.panelViews
|
||||
}
|
||||
export default getters
|
||||
|
||||
@ -21,6 +21,7 @@ import event from '@/components/canvas/store/event'
|
||||
import layer from '@/components/canvas/store/layer'
|
||||
import snapshot from '@/components/canvas/store/snapshot'
|
||||
import lock from '@/components/canvas/store/lock'
|
||||
import task from './modules/task'
|
||||
import { valueValid, formatCondition } from '@/utils/conditionUtil'
|
||||
import { Condition } from '@/components/widget/bean/Condition'
|
||||
|
||||
@ -44,6 +45,7 @@ const data = {
|
||||
...layer.state,
|
||||
...snapshot.state,
|
||||
...lock.state,
|
||||
...task.state,
|
||||
// 编辑器模式 edit preview
|
||||
editMode: 'edit',
|
||||
// 当前页面全局数据 包括扩展公共样式 公共的仪表板样式,用来实时响应样式的变化
|
||||
@ -696,7 +698,8 @@ const data = {
|
||||
application,
|
||||
lic,
|
||||
msg,
|
||||
map
|
||||
map,
|
||||
task
|
||||
},
|
||||
getters
|
||||
}
|
||||
|
||||
49
frontend/src/store/modules/task.js
Normal file
49
frontend/src/store/modules/task.js
Normal file
@ -0,0 +1,49 @@
|
||||
import Vue from 'vue'
|
||||
const state = {
|
||||
panelViews: {}
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
|
||||
ADD_VIEW: (state, { panelId, viewId, title }) => {
|
||||
if (!state.panelViews[panelId]) {
|
||||
Vue.set(state.panelViews, panelId, [])
|
||||
}
|
||||
const views = state.panelViews[panelId]
|
||||
if (views.some(item => item.viewId === viewId)) {
|
||||
return
|
||||
}
|
||||
views.push({ viewId, title })
|
||||
state.panelViews[panelId] = views
|
||||
},
|
||||
|
||||
DEL_VIEW: (state, { panelId, viewId }) => {
|
||||
const views = state.panelViews[panelId]
|
||||
if (!views || !views.length) return
|
||||
let len = views.length
|
||||
while (len--) {
|
||||
const item = views[len]
|
||||
if (viewId === item.viewId) {
|
||||
views.splice(len, 1)
|
||||
}
|
||||
}
|
||||
state.panelViews[panelId] = views
|
||||
}
|
||||
}
|
||||
|
||||
const actions = {
|
||||
addView({ commit }, data) {
|
||||
commit('ADD_VIEW', data)
|
||||
},
|
||||
delView({ commit }, data) {
|
||||
commit('DEL_VIEW', data)
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
|
||||
@ -54,6 +54,84 @@
|
||||
<div class="content unicode" style="display: block;">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_Batch_outlined</div>
|
||||
<div class="code-name">&#xe630;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_clear_outlined</div>
|
||||
<div class="code-name">&#xe61d;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_dialpad_outlined</div>
|
||||
<div class="code-name">&#xe61e;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_effects_outlined</div>
|
||||
<div class="code-name">&#xe620;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_magnify_outlined</div>
|
||||
<div class="code-name">&#xe621;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_moments-categories_outlined</div>
|
||||
<div class="code-name">&#xe623;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_pc_outlined</div>
|
||||
<div class="code-name">&#xe626;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_phone_outlined</div>
|
||||
<div class="code-name">&#xe627;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_redo_outlined</div>
|
||||
<div class="code-name">&#xe629;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon_undo_outlined</div>
|
||||
<div class="code-name">&#xe62b;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon-more</div>
|
||||
<div class="code-name">&#xe62e;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">icon-quicksetting</div>
|
||||
<div class="code-name">&#xe62f;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">square-selected</div>
|
||||
<div class="code-name">&#xe73e;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">italic</div>
|
||||
@ -648,9 +726,9 @@
|
||||
<pre><code class="language-css"
|
||||
>@font-face {
|
||||
font-family: 'iconfont';
|
||||
src: url('iconfont.woff2?t=1655779264671') format('woff2'),
|
||||
url('iconfont.woff?t=1655779264671') format('woff'),
|
||||
url('iconfont.ttf?t=1655779264671') format('truetype');
|
||||
src: url('iconfont.woff2?t=1657078050131') format('woff2'),
|
||||
url('iconfont.woff?t=1657078050131') format('woff'),
|
||||
url('iconfont.ttf?t=1657078050131') format('truetype');
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||
@ -676,6 +754,123 @@
|
||||
<div class="content font-class">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_Batch_outlined"></span>
|
||||
<div class="name">
|
||||
icon_Batch_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_Batch_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_clear_outlined"></span>
|
||||
<div class="name">
|
||||
icon_clear_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_clear_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_dialpad_outlined"></span>
|
||||
<div class="name">
|
||||
icon_dialpad_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_dialpad_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_effects_outlined"></span>
|
||||
<div class="name">
|
||||
icon_effects_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_effects_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_magnify_outlined"></span>
|
||||
<div class="name">
|
||||
icon_magnify_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_magnify_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_moments-categories_outlined"></span>
|
||||
<div class="name">
|
||||
icon_moments-categories_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_moments-categories_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_pc_outlined"></span>
|
||||
<div class="name">
|
||||
icon_pc_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_pc_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_phone_outlined"></span>
|
||||
<div class="name">
|
||||
icon_phone_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_phone_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_redo_outlined"></span>
|
||||
<div class="name">
|
||||
icon_redo_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_redo_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon_undo_outlined"></span>
|
||||
<div class="name">
|
||||
icon_undo_outlined
|
||||
</div>
|
||||
<div class="code-name">.icon-icon_undo_outlined
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon-more"></span>
|
||||
<div class="name">
|
||||
icon-more
|
||||
</div>
|
||||
<div class="code-name">.icon-icon-more
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-icon-quicksetting"></span>
|
||||
<div class="name">
|
||||
icon-quicksetting
|
||||
</div>
|
||||
<div class="code-name">.icon-icon-quicksetting
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-square-selected"></span>
|
||||
<div class="name">
|
||||
square-selected
|
||||
</div>
|
||||
<div class="code-name">.icon-square-selected
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-italic"></span>
|
||||
<div class="name">
|
||||
@ -1567,6 +1762,110 @@
|
||||
<div class="content symbol">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_Batch_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_Batch_outlined</div>
|
||||
<div class="code-name">#icon-icon_Batch_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_clear_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_clear_outlined</div>
|
||||
<div class="code-name">#icon-icon_clear_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_dialpad_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_dialpad_outlined</div>
|
||||
<div class="code-name">#icon-icon_dialpad_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_effects_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_effects_outlined</div>
|
||||
<div class="code-name">#icon-icon_effects_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_magnify_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_magnify_outlined</div>
|
||||
<div class="code-name">#icon-icon_magnify_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_moments-categories_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_moments-categories_outlined</div>
|
||||
<div class="code-name">#icon-icon_moments-categories_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_pc_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_pc_outlined</div>
|
||||
<div class="code-name">#icon-icon_pc_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_phone_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_phone_outlined</div>
|
||||
<div class="code-name">#icon-icon_phone_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_redo_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_redo_outlined</div>
|
||||
<div class="code-name">#icon-icon_redo_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon_undo_outlined"></use>
|
||||
</svg>
|
||||
<div class="name">icon_undo_outlined</div>
|
||||
<div class="code-name">#icon-icon_undo_outlined</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon-more"></use>
|
||||
</svg>
|
||||
<div class="name">icon-more</div>
|
||||
<div class="code-name">#icon-icon-more</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-icon-quicksetting"></use>
|
||||
</svg>
|
||||
<div class="name">icon-quicksetting</div>
|
||||
<div class="code-name">#icon-icon-quicksetting</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-square-selected"></use>
|
||||
</svg>
|
||||
<div class="name">square-selected</div>
|
||||
<div class="code-name">#icon-square-selected</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-italic"></use>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2459092 */
|
||||
src: url('iconfont.woff2?t=1655779264671') format('woff2'),
|
||||
url('iconfont.woff?t=1655779264671') format('woff'),
|
||||
url('iconfont.ttf?t=1655779264671') format('truetype');
|
||||
src: url('iconfont.woff2?t=1657078050131') format('woff2'),
|
||||
url('iconfont.woff?t=1657078050131') format('woff'),
|
||||
url('iconfont.ttf?t=1657078050131') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@ -13,6 +13,58 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-icon_Batch_outlined:before {
|
||||
content: "\e630";
|
||||
}
|
||||
|
||||
.icon-icon_clear_outlined:before {
|
||||
content: "\e61d";
|
||||
}
|
||||
|
||||
.icon-icon_dialpad_outlined:before {
|
||||
content: "\e61e";
|
||||
}
|
||||
|
||||
.icon-icon_effects_outlined:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.icon-icon_magnify_outlined:before {
|
||||
content: "\e621";
|
||||
}
|
||||
|
||||
.icon-icon_moments-categories_outlined:before {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
.icon-icon_pc_outlined:before {
|
||||
content: "\e626";
|
||||
}
|
||||
|
||||
.icon-icon_phone_outlined:before {
|
||||
content: "\e627";
|
||||
}
|
||||
|
||||
.icon-icon_redo_outlined:before {
|
||||
content: "\e629";
|
||||
}
|
||||
|
||||
.icon-icon_undo_outlined:before {
|
||||
content: "\e62b";
|
||||
}
|
||||
|
||||
.icon-icon-more:before {
|
||||
content: "\e62e";
|
||||
}
|
||||
|
||||
.icon-icon-quicksetting:before {
|
||||
content: "\e62f";
|
||||
}
|
||||
|
||||
.icon-square-selected:before {
|
||||
content: "\e73e";
|
||||
}
|
||||
|
||||
.icon-italic:before {
|
||||
content: "\e777";
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -5,6 +5,97 @@
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "30342179",
|
||||
"name": "icon_Batch_outlined",
|
||||
"font_class": "icon_Batch_outlined",
|
||||
"unicode": "e630",
|
||||
"unicode_decimal": 58928
|
||||
},
|
||||
{
|
||||
"icon_id": "30335147",
|
||||
"name": "icon_clear_outlined",
|
||||
"font_class": "icon_clear_outlined",
|
||||
"unicode": "e61d",
|
||||
"unicode_decimal": 58909
|
||||
},
|
||||
{
|
||||
"icon_id": "30335253",
|
||||
"name": "icon_dialpad_outlined",
|
||||
"font_class": "icon_dialpad_outlined",
|
||||
"unicode": "e61e",
|
||||
"unicode_decimal": 58910
|
||||
},
|
||||
{
|
||||
"icon_id": "30335256",
|
||||
"name": "icon_effects_outlined",
|
||||
"font_class": "icon_effects_outlined",
|
||||
"unicode": "e620",
|
||||
"unicode_decimal": 58912
|
||||
},
|
||||
{
|
||||
"icon_id": "30335257",
|
||||
"name": "icon_magnify_outlined",
|
||||
"font_class": "icon_magnify_outlined",
|
||||
"unicode": "e621",
|
||||
"unicode_decimal": 58913
|
||||
},
|
||||
{
|
||||
"icon_id": "30335264",
|
||||
"name": "icon_moments-categories_outlined",
|
||||
"font_class": "icon_moments-categories_outlined",
|
||||
"unicode": "e623",
|
||||
"unicode_decimal": 58915
|
||||
},
|
||||
{
|
||||
"icon_id": "30335293",
|
||||
"name": "icon_pc_outlined",
|
||||
"font_class": "icon_pc_outlined",
|
||||
"unicode": "e626",
|
||||
"unicode_decimal": 58918
|
||||
},
|
||||
{
|
||||
"icon_id": "30335296",
|
||||
"name": "icon_phone_outlined",
|
||||
"font_class": "icon_phone_outlined",
|
||||
"unicode": "e627",
|
||||
"unicode_decimal": 58919
|
||||
},
|
||||
{
|
||||
"icon_id": "30335326",
|
||||
"name": "icon_redo_outlined",
|
||||
"font_class": "icon_redo_outlined",
|
||||
"unicode": "e629",
|
||||
"unicode_decimal": 58921
|
||||
},
|
||||
{
|
||||
"icon_id": "30335389",
|
||||
"name": "icon_undo_outlined",
|
||||
"font_class": "icon_undo_outlined",
|
||||
"unicode": "e62b",
|
||||
"unicode_decimal": 58923
|
||||
},
|
||||
{
|
||||
"icon_id": "30335393",
|
||||
"name": "icon-more",
|
||||
"font_class": "icon-more",
|
||||
"unicode": "e62e",
|
||||
"unicode_decimal": 58926
|
||||
},
|
||||
{
|
||||
"icon_id": "30335394",
|
||||
"name": "icon-quicksetting",
|
||||
"font_class": "icon-quicksetting",
|
||||
"unicode": "e62f",
|
||||
"unicode_decimal": 58927
|
||||
},
|
||||
{
|
||||
"icon_id": "19959130",
|
||||
"name": "square-selected",
|
||||
"font_class": "square-selected",
|
||||
"unicode": "e73e",
|
||||
"unicode_decimal": 59198
|
||||
},
|
||||
{
|
||||
"icon_id": "2958392",
|
||||
"name": "italic",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -152,7 +152,7 @@ div:focus {
|
||||
}
|
||||
|
||||
.el-tabs__content {
|
||||
height: calc(100% - 55px) !important;
|
||||
height: calc(100%) !important;
|
||||
margin-top: 5px;
|
||||
|
||||
.el-tab-pane {
|
||||
@ -833,3 +833,6 @@ div:focus {
|
||||
.fu-operator-component__label {
|
||||
width: 100px !important;
|
||||
}
|
||||
.view-select-option {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
<span class="params-title">{{ $t('panel.inner_padding') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-slider v-model="curComponent.commonBackground.innerPadding" show-input :show-input-controls="false" input-size="mini" :max="15" />
|
||||
<el-slider v-model="curComponent.commonBackground.innerPadding" show-input :show-input-controls="false" input-size="mini" :max="50" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="height: 50px;overflow: hidden">
|
||||
|
||||
@ -139,12 +139,6 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt
|
||||
slider: slider,
|
||||
annotations: analyse,
|
||||
interactions: [
|
||||
{
|
||||
type: 'element-active', cfg: {
|
||||
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
|
||||
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'legend-active', cfg: {
|
||||
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],
|
||||
|
||||
@ -132,12 +132,6 @@ export function baseAreaOptionAntV(plot, container, chart, action) {
|
||||
slider: slider,
|
||||
annotations: analyse,
|
||||
interactions: [
|
||||
{
|
||||
type: 'element-active', cfg: {
|
||||
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
|
||||
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'legend-active', cfg: {
|
||||
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],
|
||||
|
||||
@ -73,6 +73,7 @@ export function baseRadarOptionAntV(plot, container, chart, action) {
|
||||
if (customAttr.size) {
|
||||
const s = JSON.parse(JSON.stringify(customAttr.size))
|
||||
options.radius = parseFloat(parseInt(s.radarSize) / 100)
|
||||
options.radius = options.radius > 1 ? 1 : options.radius
|
||||
if (s.radarShape === 'polygon') {
|
||||
yAxis.grid = {
|
||||
line: {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import { componentStyle } from '../common/common'
|
||||
import {BASE_ECHARTS_SELECT, DEFAULT_TOOLTIP} from '@/views/chart/chart/chart'
|
||||
import { BASE_ECHARTS_SELECT, DEFAULT_TOOLTIP } from '@/views/chart/chart/chart'
|
||||
|
||||
export function baseTreemapOption(chart_option, chart) {
|
||||
// 处理shape attr
|
||||
@ -54,7 +54,6 @@ export function baseTreemapOption(chart_option, chart) {
|
||||
}
|
||||
chart_option.series[0].selectedMode = true
|
||||
chart_option.series[0].select = BASE_ECHARTS_SELECT
|
||||
// y.type = 'treemap'
|
||||
chart_option.series[0].data.push(y)
|
||||
}
|
||||
chart_option.series[0].name = chart.data.series[0].name
|
||||
|
||||
@ -1393,6 +1393,7 @@ export const TYPE_CONFIGS = [
|
||||
'size-selector': [
|
||||
'lineWidth',
|
||||
'lineSymbol',
|
||||
'lineType',
|
||||
'lineSymbolSize',
|
||||
'lineSmooth'
|
||||
],
|
||||
@ -1472,6 +1473,7 @@ export const TYPE_CONFIGS = [
|
||||
'size-selector': [
|
||||
'lineWidth',
|
||||
'lineSymbol',
|
||||
'lineType',
|
||||
'lineSymbolSize',
|
||||
'lineSmooth'
|
||||
],
|
||||
|
||||
@ -220,7 +220,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.myChart && this.searchCount > 0) {
|
||||
if (this.myChart && chart.type !== 'liquid' && this.searchCount > 0) {
|
||||
this.myChart.options.animation = false
|
||||
}
|
||||
|
||||
|
||||
@ -389,7 +389,7 @@ export default {
|
||||
this.myChart.store.set('scrollY', this.scrollTop)
|
||||
this.myChart.render()
|
||||
|
||||
if (senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
|
||||
if (senior && senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
|
||||
const rowHeight = customAttr.size.tableItemHeight
|
||||
const headerHeight = customAttr.size.tableTitleHeight
|
||||
|
||||
|
||||
@ -102,33 +102,33 @@
|
||||
|
||||
<span v-show="chart.type && chart.type.includes('horizontal')">
|
||||
<el-form-item :label="$t('chart.value_formatter_type')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeXAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeXAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="type in typeList" :key="type.value" :label="$t('chart.' + type.name)" :value="type.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'auto'" :label="$t('chart.value_formatter_decimal_count')" class="form-item">
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeXAxisStyle" />
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeXAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'percent'" :label="$t('chart.value_formatter_unit')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeXAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeXAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="item in unitList" :key="item.value" :label="$t('chart.' + item.name)" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_suffix')" class="form-item">
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeXAxisStyle" />
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeXAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_thousand_separator')" class="form-item">
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeXAxisStyle" />
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeXAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
</span>
|
||||
</span>
|
||||
<el-divider v-if="showProperty('axisLabel')" />
|
||||
<el-form-item v-show="showProperty('axisLabel')" :label="$t('chart.content_formatter')" class="form-item">
|
||||
<el-input v-model="axisForm.axisLabel.formatter" type="textarea" :autosize="{ minRows: 4, maxRows: 4}" @blur="changeXAxisStyle('')" />
|
||||
<el-input v-model="axisForm.axisLabel.formatter" type="textarea" :autosize="{ minRows: 4, maxRows: 4}" @blur="changeXAxisStyle('axisLabel')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
@ -95,27 +95,27 @@
|
||||
|
||||
<span v-show="chart.type && chart.type.includes('horizontal')">
|
||||
<el-form-item :label="$t('chart.value_formatter_type')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeXAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeXAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="type in typeList" :key="type.value" :label="$t('chart.' + type.name)" :value="type.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'auto'" :label="$t('chart.value_formatter_decimal_count')" class="form-item">
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeXAxisStyle" />
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeXAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'percent'" :label="$t('chart.value_formatter_unit')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeXAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeXAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="item in unitList" :key="item.value" :label="$t('chart.' + item.name)" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_suffix')" class="form-item">
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeXAxisStyle" />
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeXAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_thousand_separator')" class="form-item">
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeXAxisStyle" />
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeXAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@ -102,27 +102,27 @@
|
||||
|
||||
<span v-show="chart.type && !chart.type.includes('horizontal')">
|
||||
<el-form-item :label="$t('chart.value_formatter_type')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeYAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeYAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="type in typeList" :key="type.value" :label="$t('chart.' + type.name)" :value="type.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'auto'" :label="$t('chart.value_formatter_decimal_count')" class="form-item">
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeYAxisStyle" />
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'percent'" :label="$t('chart.value_formatter_unit')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeYAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeYAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="item in unitList" :key="item.value" :label="$t('chart.' + item.name)" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_suffix')" class="form-item">
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeYAxisStyle" />
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_thousand_separator')" class="form-item">
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeYAxisStyle" />
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@ -95,27 +95,27 @@
|
||||
|
||||
<span v-show="chart.type && !chart.type.includes('horizontal')">
|
||||
<el-form-item :label="$t('chart.value_formatter_type')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeYAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeYAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="type in typeList" :key="type.value" :label="$t('chart.' + type.name)" :value="type.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'auto'" :label="$t('chart.value_formatter_decimal_count')" class="form-item">
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeYAxisStyle" />
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'percent'" :label="$t('chart.value_formatter_unit')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeYAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeYAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="item in unitList" :key="item.value" :label="$t('chart.' + item.name)" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_suffix')" class="form-item">
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeYAxisStyle" />
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_thousand_separator')" class="form-item">
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeYAxisStyle" />
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@ -102,27 +102,27 @@
|
||||
|
||||
<span v-show="chart.type && !chart.type.includes('horizontal')">
|
||||
<el-form-item :label="$t('chart.value_formatter_type')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeYAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeYAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="type in typeList" :key="type.value" :label="$t('chart.' + type.name)" :value="type.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'auto'" :label="$t('chart.value_formatter_decimal_count')" class="form-item">
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeYAxisStyle" />
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'percent'" :label="$t('chart.value_formatter_unit')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeYAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeYAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="item in unitList" :key="item.value" :label="$t('chart.' + item.name)" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_suffix')" class="form-item">
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeYAxisStyle" />
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_thousand_separator')" class="form-item">
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeYAxisStyle" />
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@ -95,27 +95,27 @@
|
||||
|
||||
<span v-show="chart.type && !chart.type.includes('horizontal')">
|
||||
<el-form-item :label="$t('chart.value_formatter_type')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeYAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.type" @change="changeYAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="type in typeList" :key="type.value" :label="$t('chart.' + type.name)" :value="type.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'auto'" :label="$t('chart.value_formatter_decimal_count')" class="form-item">
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeYAxisStyle" />
|
||||
<el-input-number v-model="axisForm.axisLabelFormatter.decimalCount" :precision="0" :min="0" :max="10" size="mini" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-show="axisForm.axisLabelFormatter.type !== 'percent'" :label="$t('chart.value_formatter_unit')" class="form-item">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeYAxisStyle">
|
||||
<el-select v-model="axisForm.axisLabelFormatter.unit" :placeholder="$t('chart.pls_select_field')" size="mini" @change="changeYAxisStyle('axisLabelFormatter')">
|
||||
<el-option v-for="item in unitList" :key="item.value" :label="$t('chart.' + item.name)" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_suffix')" class="form-item">
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeYAxisStyle" />
|
||||
<el-input v-model="axisForm.axisLabelFormatter.suffix" size="mini" clearable :placeholder="$t('commons.input_content')" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('chart.value_formatter_thousand_separator')" class="form-item">
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeYAxisStyle" />
|
||||
<el-checkbox v-model="axisForm.axisLabelFormatter.thousandSeparator" @change="changeYAxisStyle('axisLabelFormatter')" />
|
||||
</el-form-item>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@ -311,6 +311,8 @@ export default {
|
||||
this.$emit('onColorChange', this.colorForm)
|
||||
this.colorForm['modifyName'] = 'colors'
|
||||
this.$emit('onColorChange', this.colorForm)
|
||||
this.colorForm['modifyName'] = 'seriesColors'
|
||||
this.$emit('onColorChange', this.colorForm)
|
||||
},
|
||||
resetCustomColor() {
|
||||
this.changeColorOption()
|
||||
|
||||
@ -114,6 +114,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.showProperty('position-pie')) {
|
||||
this.labelForm.position = 'outside'
|
||||
}
|
||||
this.init()
|
||||
this.initOptions()
|
||||
this.initData()
|
||||
|
||||
@ -127,6 +127,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.showProperty('position-pie')) {
|
||||
this.labelForm.position = 'outer'
|
||||
}
|
||||
this.init()
|
||||
this.initOptions()
|
||||
this.initData()
|
||||
|
||||
@ -34,6 +34,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="showProperty('lineSymbolSize')" :label="$t('chart.line_symbol_size')" class="form-item form-item-slider">
|
||||
<el-slider v-model="sizeForm.lineSymbolSize" show-input :show-input-controls="false" input-size="mini" :min="0" :max="20" @change="changeBarSizeCase('lineSymbolSize')" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="showProperty('lineSmooth')" :label="$t('chart.line_smooth')" class="form-item">
|
||||
<el-checkbox v-model="sizeForm.lineSmooth" @change="changeBarSizeCase('lineSmooth')">{{ $t('chart.line_smooth') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
@ -187,7 +190,7 @@
|
||||
<el-form-item :label="$t('chart.line_width')" class="form-item form-item-slider">
|
||||
<el-slider v-model="sizeForm.lineWidth" show-input :show-input-controls="false" input-size="mini" :min="0" :max="10" @change="changeBarSizeCase('lineWidth')" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="false" :label="$t('chart.line_type')" class="form-item">
|
||||
<el-form-item :label="$t('chart.line_type')" class="form-item">
|
||||
<el-radio-group v-model="sizeForm.lineType" @change="changeBarSizeCase('lineType')">
|
||||
<el-radio-button label="solid">{{ $t('chart.line_type_solid') }}</el-radio-button>
|
||||
<el-radio-button label="dashed">{{ $t('chart.line_type_dashed') }}</el-radio-button>
|
||||
@ -203,6 +206,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.line_symbol_size')" class="form-item form-item-slider">
|
||||
<el-slider v-model="sizeForm.lineSymbolSize" show-input :show-input-controls="false" input-size="mini" :min="0" :max="20" @change="changeBarSizeCase" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.line_smooth')" class="form-item">
|
||||
<el-checkbox v-model="sizeForm.lineSmooth" @change="changeBarSizeCase('lineSmooth')">{{ $t('chart.line_smooth') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
|
||||
@ -270,7 +270,7 @@
|
||||
show-input
|
||||
:show-input-controls="false"
|
||||
input-size="mini"
|
||||
@change="changeBarSizeCase('tableColumnMode')"
|
||||
@change="changeBarSizeCase('tableColumnWidth')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<el-color-picker v-model="tooltipForm.textStyle.color" class="color-picker-style" :predefine="predefineColors" @change="changeTooltipAttr('textStyle')" />
|
||||
</el-form-item>
|
||||
<el-form-item v-show="showProperty('textStyle')" :label="$t('chart.background')" class="form-item">
|
||||
<el-color-picker v-model="tooltipForm.backgroundColor" class="color-picker-style" :predefine="predefineColors" @change="changeTooltipAttr('textStyle')" />
|
||||
<el-color-picker v-model="tooltipForm.backgroundColor" class="color-picker-style" :predefine="predefineColors" @change="changeTooltipAttr('backgroundColor')" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
@ -148,7 +148,7 @@ export default {
|
||||
eventBus.$on('resizing', this.chartResize)
|
||||
},
|
||||
beforeDestroy() {
|
||||
eventBus.$off('resizing',this.chartResize)
|
||||
eventBus.$off('resizing', this.chartResize)
|
||||
clearInterval(this.scrollTimer)
|
||||
},
|
||||
methods: {
|
||||
@ -387,7 +387,7 @@ export default {
|
||||
})
|
||||
}, 0)
|
||||
|
||||
if (senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
|
||||
if (senior && senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
|
||||
let rowHeight = customAttr.size.tableItemHeight
|
||||
if (rowHeight < 36) {
|
||||
rowHeight = 36
|
||||
|
||||
@ -434,13 +434,6 @@ export default {
|
||||
panelInfo() {
|
||||
return this.$store.state.panel.panelInfo
|
||||
}
|
||||
/* pluginRenderOptions() {
|
||||
const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) || []
|
||||
const pluginOptions = plugins.filter(plugin => !this.renderOptions.some(option => option.value === plugin.render)).map(plugin => {
|
||||
return { name: plugin.render, value: plugin.render }
|
||||
})
|
||||
return [...this.renderOptions, ...pluginOptions]
|
||||
} */
|
||||
},
|
||||
watch: {
|
||||
saveStatus() {
|
||||
@ -693,6 +686,9 @@ export default {
|
||||
this.tData = res.data
|
||||
this.initCurrentNode()
|
||||
}
|
||||
if (this.filterText) {
|
||||
this.$refs.chartTreeRef.filter(this.filterText)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@ -1663,47 +1663,6 @@ export default {
|
||||
delete view.data
|
||||
return view
|
||||
},
|
||||
// calcData(getData, trigger, needRefreshGroup = false, switchType = false) {
|
||||
// this.hasEdit = true
|
||||
// const view = this.buildParam(getData, trigger, needRefreshGroup, switchType)
|
||||
// if (!view) return
|
||||
// post('/chart/view/calcData/' + this.panelInfo.id, {
|
||||
// view: view,
|
||||
// requestList: {
|
||||
// filter: [],
|
||||
// drill: this.drillClickDimensionList
|
||||
// }
|
||||
// }).then(response => {
|
||||
// const view = JSON.parse(JSON.stringify(response.data))
|
||||
// this.view.xaxis = view.xaxis ? JSON.parse(view.xaxis) : []
|
||||
// this.view.xaxisExt = view.xaxisExt ? JSON.parse(view.xaxisExt) : []
|
||||
// this.view.yaxis = view.yaxis ? JSON.parse(view.yaxis) : []
|
||||
// this.view.yaxisExt = view.yaxisExt ? JSON.parse(view.yaxisExt) : []
|
||||
// this.view.extStack = view.extStack ? JSON.parse(view.extStack) : []
|
||||
// this.view.drillFields = view.drillFields ? JSON.parse(view.drillFields) : []
|
||||
// this.view.extBubble = view.extBubble ? JSON.parse(view.extBubble) : []
|
||||
// this.view.customAttr = view.customAttr ? JSON.parse(view.customAttr) : {}
|
||||
// this.view.customStyle = view.customStyle ? JSON.parse(view.customStyle) : {}
|
||||
// this.view.customFilter = view.customFilter ? JSON.parse(view.customFilter) : {}
|
||||
// this.view.senior = view.senior ? JSON.parse(view.senior) : {}
|
||||
// 将视图传入echart组件
|
||||
// this.chart = response.data
|
||||
// this.data = response.data.data
|
||||
// this.httpRequest.status = true
|
||||
// if (this.chart.privileges) {
|
||||
// this.param.privileges = this.chart.privileges
|
||||
// }
|
||||
// if (!response.data.drill) {
|
||||
// this.drillClickDimensionList.splice(this.drillClickDimensionList.length - 1, 1)
|
||||
//
|
||||
// this.resetDrill()
|
||||
// }
|
||||
// this.drill = response.data.drill
|
||||
// this.drillFilters = JSON.parse(JSON.stringify(response.data.drillFilters ? response.data.drillFilters : []))
|
||||
//
|
||||
// this.closeChangeChart()
|
||||
// })
|
||||
// },
|
||||
calcData(getData, trigger, needRefreshGroup = false, switchType = false) {
|
||||
this.changeEditStatus(true)
|
||||
const view = this.buildParam(true, 'chart', false, switchType)
|
||||
@ -1713,7 +1672,7 @@ export default {
|
||||
bus.$emit('view-in-cache', { type: 'propChange', viewId: this.param.id })
|
||||
})
|
||||
},
|
||||
calcStyle() {
|
||||
calcStyle(modifyName) {
|
||||
this.changeEditStatus(true)
|
||||
// 将视图传入echart...组件
|
||||
const view = JSON.parse(JSON.stringify(this.view))
|
||||
@ -1739,7 +1698,11 @@ export default {
|
||||
if (!viewSave) return
|
||||
viewEditSave(this.panelInfo.id, viewSave)
|
||||
|
||||
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view })
|
||||
if (modifyName === 'color') {
|
||||
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view, refreshProp: 'customAttr' })
|
||||
} else {
|
||||
bus.$emit('view-in-cache', { type: 'styleChange', viewId: this.param.id, viewInfo: view })
|
||||
}
|
||||
},
|
||||
|
||||
closeEdit() {
|
||||
@ -1900,7 +1863,7 @@ export default {
|
||||
|
||||
onColorChange(val) {
|
||||
this.view.customAttr.color = val
|
||||
this.calcStyle()
|
||||
this.calcStyle('color')
|
||||
},
|
||||
|
||||
onSizeChange(val) {
|
||||
|
||||
@ -108,8 +108,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="position: absolute; left: 0px; right: 0px; bottom: 0px; height: 30px; float: left" @dblclick="setEdit">
|
||||
|
||||
<div class="title-main" @dblclick="setEdit">
|
||||
<div class="title-area">
|
||||
<el-input
|
||||
v-if="canEdit"
|
||||
@ -120,12 +119,12 @@
|
||||
/>
|
||||
<span
|
||||
v-if="!canEdit"
|
||||
style="margin-top: 8px;margin-left: 8px"
|
||||
style="margin-top: 8px;margin-left: 8px;"
|
||||
:title="subjectItem.name"
|
||||
>{{ subjectItem.name }}</span>
|
||||
<i v-if="subjectItem.type==='self' && !canEdit" class="el-icon-delete delete-icon" @click.stop="subjectDelete" />
|
||||
</div>
|
||||
</div>
|
||||
<i v-if="subjectItem.type==='self' && !canEdit" class="el-icon-delete delete-icon" @click.stop="subjectDelete" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -408,10 +407,29 @@ export default {
|
||||
|
||||
.delete-icon{
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
top: 8px;
|
||||
}
|
||||
.delete-icon:hover{
|
||||
color: red;
|
||||
}
|
||||
.title-main{
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
height: 30px;
|
||||
float: left
|
||||
}
|
||||
.subject-template:hover > .title-main {
|
||||
width: 115px;
|
||||
}
|
||||
.subject-template:hover > .el-icon-delete {
|
||||
z-index: 10;
|
||||
display:block;
|
||||
}
|
||||
|
||||
.subject-template ::v-deep .el-icon-delete {
|
||||
display:none
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
<svg-icon icon-class="panel" class="ds-icon-scene" />
|
||||
</span>
|
||||
<span v-else>
|
||||
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
|
||||
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
|
||||
</span>
|
||||
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
|
||||
</span>
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<svg-icon icon-class="panel" class="ds-icon-scene" />
|
||||
</span>
|
||||
<span v-else>
|
||||
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
|
||||
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
|
||||
</span>
|
||||
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
|
||||
</span>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<svg-icon icon-class="panel" class="ds-icon-scene" />
|
||||
</span>
|
||||
<span v-else>
|
||||
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
|
||||
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
|
||||
</span>
|
||||
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
|
||||
</span>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="component-item" >
|
||||
<div class="component-item">
|
||||
<div :style="commonStyle">
|
||||
<mobile-check-bar v-if="mobileCheckBarShow" :element="config" />
|
||||
<de-out-widget
|
||||
@ -113,7 +113,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getComponentStyleDefault(style) {
|
||||
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
|
||||
return {
|
||||
...
|
||||
getStyle(style, ['top', 'left', 'width', 'height', 'rotate']),
|
||||
position: 'relative'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -217,13 +217,13 @@
|
||||
</de-main-container>
|
||||
|
||||
<div v-show="!mobileLayoutStatus&&rightDrawOpen" class="tools-window-main">
|
||||
<div v-show="showViewToolsAside">
|
||||
<div v-if="showViewToolsAside">
|
||||
<chart-edit ref="chartEditRef" :edit-statue="showViewToolsAside&&!mobileLayoutStatus&&rightDrawOpen" :edit-from="'panel'" :param="chartEditParam" />
|
||||
</div>
|
||||
<div v-show="showBatchViewToolsAside">
|
||||
<div v-if="showBatchViewToolsAside">
|
||||
<chart-style-batch-set />
|
||||
</div>
|
||||
<div v-show="!showViewToolsAside&&!showBatchViewToolsAside">
|
||||
<div v-if="!showViewToolsAside&&!showBatchViewToolsAside">
|
||||
<el-row style="height: 40px">
|
||||
<el-tooltip :content="$t('chart.draw_back')">
|
||||
<el-button class="el-icon-d-arrow-right" style="position:absolute;left: 4px;top: 5px;" size="mini" circle @click="changeRightDrawOpen(false)" />
|
||||
@ -450,7 +450,8 @@ export default {
|
||||
enableSureButton: false,
|
||||
filterFromDrag: false,
|
||||
activeToolsName: 'view',
|
||||
rightDrawOpen: false
|
||||
rightDrawOpen: false,
|
||||
editType: null
|
||||
}
|
||||
},
|
||||
|
||||
@ -732,7 +733,7 @@ export default {
|
||||
const parent = evt.target.closest('.button-div-class')
|
||||
const self = evt.target.closest('.el-drawer__wrapper')
|
||||
// 点击样式按钮 排除
|
||||
const stick = evt.target.closest('.icon-magic-line')
|
||||
const stick = evt.target.closest('.icon-icon_effects_outlined')
|
||||
const xuanfuanniu = evt.target.closest('.icon-xuanfuanniu')
|
||||
const shujujuzhen = evt.target.closest('.icon-shujujuzhen')
|
||||
const suffix = evt.target.closest('.el-input__suffix')
|
||||
@ -891,7 +892,9 @@ export default {
|
||||
},
|
||||
sureFilter() {
|
||||
this.currentFilterCom = this.$refs['filter-setting-' + this.currentFilterCom.id].getElementInfo()
|
||||
adaptCurThemeCommonStyle(this.currentFilterCom)
|
||||
if (this.editType !== 'update') {
|
||||
adaptCurThemeCommonStyle(this.currentFilterCom)
|
||||
}
|
||||
this.$store.commit('setComponentWithId', this.currentFilterCom)
|
||||
this.$store.commit('recordSnapshot', 'sureFilter')
|
||||
this.$store.commit('setCurComponent', { component: this.currentFilterCom, index: this.curComponentIndex })
|
||||
@ -902,7 +905,8 @@ export default {
|
||||
this.currentFilterCom = component
|
||||
this.$forceUpdate()
|
||||
},
|
||||
editDialog() {
|
||||
editDialog(editType) {
|
||||
this.editType = editType
|
||||
if (this.curComponent && this.curComponent.serviceName) {
|
||||
const serviceName = this.curComponent.serviceName
|
||||
this.currentWidget = ApplicationContext.getService(serviceName)
|
||||
|
||||
@ -228,7 +228,7 @@ import LinkGenerate from '@/views/link/generate'
|
||||
import { uuid } from 'vue-uuid'
|
||||
import bus from '@/utils/bus'
|
||||
import EditPanel from './EditPanel'
|
||||
import {addGroup, delGroup, groupTree, defaultTree, panelSave, initPanelData, panelUpdate} from '@/api/panel/panel'
|
||||
import { addGroup, delGroup, groupTree, defaultTree, initPanelData, panelUpdate } from '@/api/panel/panel'
|
||||
import { mapState } from 'vuex'
|
||||
import {
|
||||
DEFAULT_COMMON_CANVAS_STYLE_STRING
|
||||
@ -621,6 +621,11 @@ export default {
|
||||
if (!userCache) {
|
||||
this.tData = res.data
|
||||
}
|
||||
if (this.filterText) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.panel_list_tree.filter(this.filterText)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
defaultTree(cache = false) {
|
||||
@ -638,6 +643,11 @@ export default {
|
||||
if (!userCache) {
|
||||
this.defaultData = res.data
|
||||
}
|
||||
if (this.filterText) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.default_panel_tree.filter(this.filterText)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@ -650,6 +660,7 @@ export default {
|
||||
this.$store.commit('setComponentDataCache', null)
|
||||
initPanelData(data.id, function(response) {
|
||||
bus.$emit('set-panel-show-type', 0)
|
||||
data.mobileLayout = response.data.mobileLayout
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@ -340,54 +340,85 @@ export default {
|
||||
}
|
||||
let repeat = false
|
||||
const repeatDsName = []
|
||||
this.tData.forEach(item => {
|
||||
if (item.id === this.form.type) {
|
||||
item.children.forEach(child => {
|
||||
if (this.formType === 'modify' && child.id === this.form.id) {
|
||||
return
|
||||
}
|
||||
const configuration = JSON.parse(child.configuration)
|
||||
if (!configuration) {
|
||||
return
|
||||
}
|
||||
switch (this.form.type) {
|
||||
case 'mysql':
|
||||
case 'TiDB':
|
||||
case 'StarRocks':
|
||||
case 'hive':
|
||||
case 'mariadb':
|
||||
case 'ds_doris':
|
||||
case 'ck':
|
||||
case 'mongo':
|
||||
case 'mariadb':
|
||||
case 'impala':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
}
|
||||
break
|
||||
case 'pg':
|
||||
case 'sqlServer':
|
||||
case 'redshift':
|
||||
case 'oracle':
|
||||
case 'db2':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port && configuration.schema == this.form.configuration.schema) {
|
||||
repeatDsName.push(child.name)
|
||||
repeat = true
|
||||
}
|
||||
break
|
||||
case 'es':
|
||||
if (configuration.url == this.form.configuration.url) {
|
||||
repeatDsName.push(child.name)
|
||||
repeat = true
|
||||
}
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
if(!this.datasourceType.isPlugin){
|
||||
this.tData.forEach(item => {
|
||||
if (item.id === this.form.type) {
|
||||
item.children.forEach(child => {
|
||||
if (this.formType === 'modify' && child.id === this.form.id) {
|
||||
return
|
||||
}
|
||||
const configuration = JSON.parse(child.configuration)
|
||||
if (!configuration) {
|
||||
return
|
||||
}
|
||||
switch (this.form.type) {
|
||||
case 'mysql':
|
||||
case 'TiDB':
|
||||
case 'StarRocks':
|
||||
case 'hive':
|
||||
case 'mariadb':
|
||||
case 'ds_doris':
|
||||
case 'ck':
|
||||
case 'mongo':
|
||||
case 'mariadb':
|
||||
case 'impala':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
}
|
||||
break
|
||||
case 'pg':
|
||||
case 'sqlServer':
|
||||
case 'redshift':
|
||||
case 'oracle':
|
||||
case 'db2':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port && configuration.schema == this.form.configuration.schema) {
|
||||
repeatDsName.push(child.name)
|
||||
repeat = true
|
||||
}
|
||||
break
|
||||
case 'es':
|
||||
if (configuration.url == this.form.configuration.url) {
|
||||
repeatDsName.push(child.name)
|
||||
repeat = true
|
||||
}
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}else {
|
||||
if( this.datasourceType.isJdbc){
|
||||
this.tData.forEach(item => {
|
||||
if (item.id === this.form.type) {
|
||||
item.children.forEach(child => {
|
||||
if (this.formType === 'modify' && child.id === this.form.id) {
|
||||
return
|
||||
}
|
||||
const configuration = JSON.parse(child.configuration)
|
||||
if (!configuration) {
|
||||
return
|
||||
}
|
||||
if(configuration.schema != null){
|
||||
if (configuration.schema == this.form.configuration.schema && configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
}
|
||||
}else {
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let status = null
|
||||
if (this.datasourceType.isPlugin) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user