From c28443ec6b306a49000874c814fad6970856ca52 Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 17 Apr 2024 09:58:49 +0800 Subject: [PATCH 01/66] =?UTF-8?q?feat(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=B8=8B=E6=8B=89=E7=BB=84=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=E5=92=8C=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=AD=97=E6=AE=B5=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/dataset/manage/DatasetDataManage.java | 6 +++--- .../java/io/dataease/engine/constant/SQLConstants.java | 2 +- .../main/java/io/dataease/engine/trans/Field2SQLObj.java | 4 ++-- .../main/java/io/dataease/engine/trans/Order2SQLObj.java | 7 ++++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java index d69e0df2e8..87d849ef59 100644 --- a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java +++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java @@ -200,7 +200,7 @@ public class DatasetDataManage { // build query sql SQLMeta sqlMeta = new SQLMeta(); Table2SQLObj.table2sqlobj(sqlMeta, null, "(" + sql + ")", crossDs); - Field2SQLObj.field2sqlObj(sqlMeta, fields, crossDs, dsMap); + Field2SQLObj.field2sqlObj(sqlMeta, fields, fields, crossDs, dsMap); WhereTree2Str.transFilterTrees(sqlMeta, rowPermissionsTree, fields, crossDs, dsMap); Order2SQLObj.getOrders(sqlMeta, fields, datasetGroupInfoDTO.getSortFields(), crossDs, dsMap); String querySQL; @@ -459,7 +459,7 @@ public class DatasetDataManage { rowPermissionsTree = permissionManage.getRowPermissionsTree(datasetGroupInfoDTO.getId(), user.getUserId()); } - Field2SQLObj.field2sqlObj(sqlMeta, fields, crossDs, dsMap); + Field2SQLObj.field2sqlObj(sqlMeta, fields, datasetGroupInfoDTO.getAllFields(), crossDs, dsMap); WhereTree2Str.transFilterTrees(sqlMeta, rowPermissionsTree, fields, crossDs, dsMap); Order2SQLObj.getOrders(sqlMeta, fields, datasetGroupInfoDTO.getSortFields(), crossDs, dsMap); String querySQL = SQLProvider.createQuerySQLWithLimit(sqlMeta, false, needOrder, true, 0, 1000); @@ -585,7 +585,7 @@ public class DatasetDataManage { datasetGroupInfoDTO.setSortFields(Collections.singletonList(deSortField)); } - Field2SQLObj.field2sqlObj(sqlMeta, fields, crossDs, dsMap); + Field2SQLObj.field2sqlObj(sqlMeta, fields, datasetGroupInfoDTO.getAllFields(), crossDs, dsMap); WhereTree2Str.transFilterTrees(sqlMeta, rowPermissionsTree, fields, crossDs, dsMap); Order2SQLObj.getOrders(sqlMeta, fields, datasetGroupInfoDTO.getSortFields(), crossDs, dsMap); String querySQL = SQLProvider.createQuerySQLWithLimit(sqlMeta, false, needOrder, false, 0, 1000); diff --git a/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java b/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java index 27396f5246..ef85e88b5a 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java +++ b/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java @@ -47,7 +47,7 @@ public class SQLConstants { public static final String FIELD_NAME = "%s.`%s`"; - public static final String FIELD_DOT = "`%s`"; + public static final String FIELD_DOT = "%s"; public static final String UNIX_TIMESTAMP = "DE_UNIX_TIMESTAMP(%s)"; diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/Field2SQLObj.java b/core/core-backend/src/main/java/io/dataease/engine/trans/Field2SQLObj.java index ce17474b6e..6b8378272e 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/Field2SQLObj.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/Field2SQLObj.java @@ -20,7 +20,7 @@ import java.util.*; */ public class Field2SQLObj { - public static void field2sqlObj(SQLMeta meta, List fields, boolean isCross, Map dsMap) { + public static void field2sqlObj(SQLMeta meta, List fields,List originFields, boolean isCross, Map dsMap) { SQLObj tableObj = meta.getTable(); if (ObjectUtils.isEmpty(tableObj)) { return; @@ -33,7 +33,7 @@ public class Field2SQLObj { String originField; if (ObjectUtils.isNotEmpty(x.getExtField()) && Objects.equals(x.getExtField(), ExtFieldConstant.EXT_CALC)) { // 解析origin name中有关联的字段生成sql表达式 - String calcFieldExp = Utils.calcFieldRegex(x.getOriginName(), tableObj, fields, isCross, dsMap); + String calcFieldExp = Utils.calcFieldRegex(x.getOriginName(), tableObj, originFields, isCross, dsMap); // 给计算字段处加一个占位符,后续SQL方言转换后再替换 originField = String.format(SqlPlaceholderConstants.CALC_FIELD_PLACEHOLDER, x.getId()); fieldsDialect.put(originField, calcFieldExp); diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/Order2SQLObj.java b/core/core-backend/src/main/java/io/dataease/engine/trans/Order2SQLObj.java index 7bbab4e9f5..5798d270be 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/Order2SQLObj.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/Order2SQLObj.java @@ -11,8 +11,8 @@ import io.dataease.engine.constant.SQLConstants; import io.dataease.engine.utils.Utils; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; @@ -24,8 +24,8 @@ public class Order2SQLObj { public static void getOrders(SQLMeta meta, List fields, List sortFields, boolean isCross, Map dsMap) { SQLObj tableObj = meta.getTable(); - List xOrders = meta.getXOrders(); - if (ObjectUtils.isEmpty(tableObj) || CollectionUtils.isEmpty(xOrders)) { + List xOrders = meta.getXOrders() == null ? new ArrayList<>() : meta.getXOrders(); + if (ObjectUtils.isEmpty(tableObj)) { return; } if (ObjectUtils.isNotEmpty(sortFields)) { @@ -35,6 +35,7 @@ public class Order2SQLObj { SQLObj order = buildSortField(deSortField, tableObj, i, fields, isCross, dsMap); xOrders.add(order); } + meta.setXOrders(xOrders); } } From f21591c1b484fbcaf9267f15e4498b24860a162e Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 17 Apr 2024 10:27:00 +0800 Subject: [PATCH 02/66] =?UTF-8?q?refactor(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E7=89=88=E4=B8=AD=E5=BF=83=E6=96=87?= =?UTF-8?q?=E6=A1=88=E5=92=8C=E5=9B=BE=E6=A0=87=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/MarketPreviewV2.vue | 66 +++++++++++-------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/core/core-frontend/src/views/template-market/component/MarketPreviewV2.vue b/core/core-frontend/src/views/template-market/component/MarketPreviewV2.vue index ad95b25cbb..aa30d332eb 100644 --- a/core/core-frontend/src/views/template-market/component/MarketPreviewV2.vue +++ b/core/core-frontend/src/views/template-market/component/MarketPreviewV2.vue @@ -9,15 +9,15 @@ - {{ - t('visualization.template_preview') - }} + 模版中心 预览 - - - +
+ + + +
@@ -499,34 +499,44 @@ onMounted(() => { } } +.arrow-side-tree { + position: absolute; + border: 1px solid #dee0e3; + background: #fff; + cursor: pointer; + z-index: 10; + &:hover { + .ed-icon { + color: var(--ed-color-primary); + } + } + .ed-icon { + font-size: 12px; + } +} + .insert-retract { position: absolute; - left: 176px; + left: 182px; top: 2px; - display: inline-block; - font-size: 34px; - font-weight: 400 !important; - font-family: '阿里巴巴普惠体 3.0 55 Regular L3'; - line-height: 1; - white-space: nowrap; + border: 1px solid #dee0e3; + background: #fff; cursor: pointer; - color: #646a73; - -webkit-appearance: none; - text-align: center; - box-sizing: border-box; - outline: 0; - margin: 0; - transition: 0.1s; - border-radius: 3px; - - &:active { - color: #000; - border-color: #3a8ee6; - outline: 0; - } + height: 24px; + width: 24px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0px 5px 10px 0px #1f23291a; &:hover { - color: #3a8ee6; + .ed-icon { + color: var(--ed-color-primary); + } + } + .ed-icon { + font-size: 12px; } } From e2a6963e0b194ee111aafdfea37d9f419631d38f Mon Sep 17 00:00:00 2001 From: ulleo Date: Wed, 17 Apr 2024 10:34:42 +0800 Subject: [PATCH 03/66] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8F=8C=E8=BD=B4=E5=9B=BE=E8=AE=BE=E7=BD=AE=E5=8F=B3?= =?UTF-8?q?=E8=BD=B4=E8=BE=85=E5=8A=A9=E7=BA=BF=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/models/chart/chart-senior.d.ts | 2 +- .../editor-senior/components/AssistLine.vue | 5 ----- .../components/dialog/AssistLineEdit.vue | 16 ++++++++-------- .../js/panel/charts/others/chart-mix.ts | 4 ++-- .../components/js/panel/common/common_antv.ts | 12 +++++++----- .../api/chart/dto/ChartSeniorAssistDTO.java | 2 +- 6 files changed, 19 insertions(+), 22 deletions(-) diff --git a/core/core-frontend/src/models/chart/chart-senior.d.ts b/core/core-frontend/src/models/chart/chart-senior.d.ts index ccc6d7dba5..ab9d0cdceb 100644 --- a/core/core-frontend/src/models/chart/chart-senior.d.ts +++ b/core/core-frontend/src/models/chart/chart-senior.d.ts @@ -108,7 +108,7 @@ declare interface AssistLine { */ summary: string - axisType: 'left' | 'right' + yAxisType: 'left' | 'right' } /** diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/AssistLine.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/AssistLine.vue index b496b3dae5..ca434bda5c 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/AssistLine.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/AssistLine.vue @@ -54,11 +54,6 @@ const state = reactive({ quotaFields: [] }) -const axisType = [ - { type: 'left', name: t('chart.drag_block_value_axis_left') }, - { type: 'right', name: t('chart.drag_block_value_axis_right') } -] - watch( () => props.chart.senior.assistLineCfg, () => { diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/AssistLineEdit.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/AssistLineEdit.vue index 775b821b22..55e2f6df10 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/AssistLineEdit.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/dialog/AssistLineEdit.vue @@ -26,7 +26,7 @@ const props = defineProps({ } }) -const axisTypes = [ +const yAxisTypes = [ { type: 'left', name: t('chart.drag_block_value_axis_left') }, { type: 'right', name: t('chart.drag_block_value_axis_right') } ] @@ -39,7 +39,7 @@ const state = reactive({ fieldId: '', summary: 'avg', axis: 'y', // 主轴 - axisType: 'left', + yAxisType: 'left', value: '0', lineType: 'solid', color: '#ff0000', @@ -98,8 +98,8 @@ const removeLine = index => { changeAssistLine() } -const changeAxisType = item => { - if (props.useQuotaExt && item.axisType === 'right') { +const changeYAxisType = item => { + if (props.useQuotaExt && item.yAxisType === 'right') { item.fieldId = props.quotaExtFields ? props.quotaExtFields[0]?.id : null item.curField = getQuotaExtField(item.fieldId) } else { @@ -113,7 +113,7 @@ const changeAssistLine = () => { emit('onAssistLineChange', state.lineArr) } const changeAssistLineField = item => { - if (props.useQuotaExt && item.axisType === 'right') { + if (props.useQuotaExt && item.yAxisType === 'right') { item.curField = getQuotaExtField(item.fieldId) } else { item.curField = getQuotaField(item.fieldId) @@ -169,9 +169,9 @@ onMounted(() => { /> - + { @change="changeAssistLineField(item)" > { protected configAnalyse(chart: Chart, options: DualAxesOptions): DualAxesOptions { const list = getAnalyse(chart) const annotations = { - value: filter(list, l => l.axisType === 'left'), - valueExt: filter(list, l => l.axisType === 'right') + value: filter(list, l => l.yAxisType === 'left'), + valueExt: filter(list, l => l.yAxisType === 'right') } return { ...options, annotations } } diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts index db58956d67..5b8fe40894 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts @@ -681,10 +681,10 @@ export function getAnalyse(chart: Chart) { const content = ele.name + ' : ' + - valueFormatter(value, ele.axisType === 'left' ? axisFormatterCfg : axisExtFormatterCfg) + valueFormatter(value, ele.yAxisType === 'left' ? axisFormatterCfg : axisExtFormatterCfg) assistLine.push({ type: 'line', - axisType: ele.axisType, + yAxisType: ele.yAxisType, start: ['start', value], end: ['end', value], style: { @@ -694,15 +694,17 @@ export function getAnalyse(chart: Chart) { }) assistLine.push({ type: 'text', - axisType: ele.axisType, + yAxisType: ele.yAxisType, position: [ - (ele.axisType === 'left' ? yAxisPosition : yAxisExtPosition) === 'left' ? 'start' : 'end', + (ele.yAxisType === 'left' ? yAxisPosition : yAxisExtPosition) === 'left' + ? 'start' + : 'end', value ], content: content, offsetY: -2, offsetX: - (ele.axisType === 'left' ? yAxisPosition : yAxisExtPosition) === 'left' + (ele.yAxisType === 'left' ? yAxisPosition : yAxisExtPosition) === 'left' ? 2 : -10 * (content.length - 2), style: { diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartSeniorAssistDTO.java b/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartSeniorAssistDTO.java index 29c905a54b..be366da8df 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartSeniorAssistDTO.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/chart/dto/ChartSeniorAssistDTO.java @@ -15,7 +15,7 @@ public class ChartSeniorAssistDTO { private Long fieldId; private String summary; private String axis; - private String axisType; + private String yAxisType; private String value; private String lineType; private String color; From f1afd92d35e2064fe1381c58b4b387be2ed5ab0e Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 17 Apr 2024 11:14:36 +0800 Subject: [PATCH 04/66] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=80=BC=E5=92=8C=E7=BB=91=E5=AE=9A=E5=80=BC=20#7343?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/v-query/Component.vue | 50 ++++++++++++++++++- .../v-query/QueryConditionConfiguration.vue | 1 + .../src/custom-component/v-query/Select.vue | 41 +++++++++++++-- .../src/custom-component/v-query/options.ts | 1 + core/core-frontend/src/hooks/web/useFilter.ts | 11 ++-- 5 files changed, 96 insertions(+), 8 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue index 23e3b86535..74c6ce67bb 100644 --- a/core/core-frontend/src/custom-component/v-query/Component.vue +++ b/core/core-frontend/src/custom-component/v-query/Component.vue @@ -13,7 +13,10 @@ import { watch, computed, onMounted, - CSSProperties + onBeforeMount, + CSSProperties, + shallowRef, + provide } from 'vue' import { storeToRefs } from 'pinia' import { useI18n } from '@/hooks/web/useI18n' @@ -156,7 +159,52 @@ const onComponentClick = () => { } const { emitter } = useEmitt() +const unMountSelect = shallowRef([]) +onBeforeMount(() => { + unMountSelect.value = list.value.map(ele => ele.id) +}) +const releaseSelect = id => { + unMountSelect.value = unMountSelect.value.filter(ele => ele !== id) +} + +const queryDataForId = id => { + let requiredName = '' + const emitterList = (element.value.propValue || []) + .filter(ele => ele.id === id) + .reduce((pre, next) => { + if (next.required) { + if (!next.defaultValueCheck) { + requiredName = next.name + } + + if ( + (Array.isArray(next.selectValue) && !next.selectValue.length) || + (next.selectValue !== 0 && !next.selectValue) + ) { + requiredName = next.name + } + } + const keyList = Object.entries(next.checkedFieldsMap) + .filter(ele => next.checkedFields.includes(ele[0])) + .filter(ele => !!ele[1]) + .map(ele => ele[0]) + pre = [...new Set([...keyList, ...pre])] + return pre + }, []) + if (!!requiredName) { + ElMessage.error(`【${requiredName}】查询条件是必填项,请设置选项值后,再进行查询!`) + return + } + if (!emitterList.length) return + emitterList.forEach(ele => { + emitter.emit(`query-data-${ele}`) + }) +} + +provide('unmount-select', unMountSelect) +provide('release-unmount-select', releaseSelect) +provide('query-data-for-id', queryDataForId) onBeforeUnmount(() => { emitter.off(`addQueryCriteria${element.value.id}`) emitter.off(`editQueryCriteria${element.value.id}`) diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index 03e5b1a53d..2e12e7e5ed 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -675,6 +675,7 @@ const parameterCompletion = () => { timeType: 'fixed', required: false, defaultMapValue: [], + mapValue: [], parametersStart: null, conditionType: 0, conditionValueOperatorF: 'eq', diff --git a/core/core-frontend/src/custom-component/v-query/Select.vue b/core/core-frontend/src/custom-component/v-query/Select.vue index dededc3fcb..7b447292dc 100644 --- a/core/core-frontend/src/custom-component/v-query/Select.vue +++ b/core/core-frontend/src/custom-component/v-query/Select.vue @@ -1,11 +1,23 @@ @@ -425,6 +428,7 @@ defineExpose({ v-loading="loading" @change="handleValueChange" clearable + ref="single" :style="selectStyle" filterable radio diff --git a/core/core-frontend/src/custom-component/v-query/TextSearch.vue b/core/core-frontend/src/custom-component/v-query/TextSearch.vue index eb81b8dece..ed2f13fac7 100644 --- a/core/core-frontend/src/custom-component/v-query/TextSearch.vue +++ b/core/core-frontend/src/custom-component/v-query/TextSearch.vue @@ -14,7 +14,7 @@ interface SelectConfig { const operators = [ { - label: '精准匹配', + label: '精确匹配', value: 'eq' }, { @@ -143,7 +143,7 @@ onBeforeMount(() => { opacity: 0.3; position: absolute; right: 5px; - bottom: 5px; + bottom: 3px; width: 195px; z-index: 10; diff --git a/core/core-frontend/src/hooks/web/useFilter.ts b/core/core-frontend/src/hooks/web/useFilter.ts index a6af320df8..3c678c1ea8 100644 --- a/core/core-frontend/src/hooks/web/useFilter.ts +++ b/core/core-frontend/src/hooks/web/useFilter.ts @@ -84,9 +84,10 @@ const getValueByDefaultValueCheckOrFirstLoad = ( multiple: boolean, defaultMapValue: any, optionValueSource: number, - mapValue: any + mapValue: any, + displayType: string ) => { - if (optionValueSource === 1) { + if (optionValueSource === 1 && defaultMapValue?.length && ![1, 7].includes(+displayType)) { if (firstLoad) { return defaultValueCheck ? defaultMapValue : multiple ? [] : '' } @@ -181,7 +182,7 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa item.checkedFields.includes(curComponentId) && item.checkedFieldsMap[curComponentId] ) { - let selectValue = '' + let selectValue const { selectValue: value, timeGranularityMultiple, @@ -210,6 +211,14 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa multiple } = item + console.log( + 'displayType', + timeType === 'dynamic', + [1, 7].includes(+displayType), + firstLoad, + curComponentId + ) + if (timeType === 'dynamic' && [1, 7].includes(+displayType) && firstLoad) { if (+displayType === 1) { selectValue = getDynamicRange(item) @@ -249,6 +258,7 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa ) item.defaultValue = [startTime, endTime] item.selectValue = [startTime, endTime] + selectValue = [startTime, endTime] } } else if (displayType === '8') { selectValue = getResult( @@ -268,7 +278,8 @@ export const searchQuery = (queryComponentList, filter, curComponentId, firstLoa multiple, defaultMapValue, optionValueSource, - mapValue + mapValue, + displayType ) } if ( diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/FieldMore.vue b/core/core-frontend/src/views/visualized/data/dataset/form/FieldMore.vue index 7a3b0a327d..6eda0d4dfb 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/FieldMore.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/FieldMore.vue @@ -120,7 +120,9 @@ const handleChange = () => { From 656584e0ab923c5919047021effa8e6ed899adff Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 19 Apr 2024 18:02:14 +0800 Subject: [PATCH 47/66] =?UTF-8?q?refactor(=E5=9B=BE=E8=A1=A8):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=AF=8C=E6=96=87=E6=9C=AC=E5=BC=B9=E5=87=BA=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/rich-text/DeRichTextView.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue index 8f8e91448c..7dc4020b6b 100644 --- a/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue +++ b/core/core-frontend/src/custom-component/rich-text/DeRichTextView.vue @@ -496,6 +496,14 @@ defineExpose({ From 13710fff028429175553b1b4bf64aaaed12e27e2 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 22 Apr 2024 11:26:42 +0800 Subject: [PATCH 50/66] =?UTF-8?q?refactor:=20UI=E5=BA=93=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-frontend/package.json b/core/core-frontend/package.json index 04e8129408..b77fd311f6 100644 --- a/core/core-frontend/package.json +++ b/core/core-frontend/package.json @@ -24,7 +24,7 @@ "axios": "^1.3.3", "crypto-js": "^4.1.1", "dayjs": "^1.11.9", - "element-plus-secondary": "^0.5.5", + "element-plus-secondary": "^0.5.6", "element-resize-detector": "^1.2.4", "file-saver": "^2.0.5", "html-to-image": "^1.11.11", From a35c98b03e9132e362b9c15c2034b383cc71b8dd Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 22 Apr 2024 15:10:43 +0800 Subject: [PATCH 51/66] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E5=90=8E=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=97=A0=E6=B3=95=E7=BB=A7?= =?UTF-8?q?=E7=BB=AD=E5=90=91tab=E7=BB=84=E4=BB=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/de-tabs/Component.vue | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/core/core-frontend/src/custom-component/de-tabs/Component.vue b/core/core-frontend/src/custom-component/de-tabs/Component.vue index 9c1ce42381..86b453b4c8 100644 --- a/core/core-frontend/src/custom-component/de-tabs/Component.vue +++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue @@ -264,16 +264,18 @@ const componentMoveIn = component => { dvMainStore.setCurComponent({ component: null, index: null }) component.canvasId = element.value.id + '--' + tabItem.name const refInstance = currentInstance.refs['tabCanvas_' + index][0] - const matrixBase = refInstance.getBaseMatrixSize() //矩阵基础大小 - canvasChangeAdaptor(component, matrixBase) - tabItem.componentData.push(component) - nextTick(() => { - component.x = 1 - component.y = 1 - component.style.left = 0 - component.style.top = 0 - refInstance.addItemBox(component) //在适当的时候初始化布局组件 - }) + if (refInstance) { + const matrixBase = refInstance.getBaseMatrixSize() //矩阵基础大小 + canvasChangeAdaptor(component, matrixBase) + tabItem.componentData.push(component) + nextTick(() => { + component.x = 1 + component.y = 1 + component.style.left = 0 + component.style.top = 0 + refInstance.addItemBox(component) //在适当的时候初始化布局组件 + }) + } } }) } From d4ec47d5aa14f1790a0d5b594a3816cf3c74ba19 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 22 Apr 2024 15:43:50 +0800 Subject: [PATCH 52/66] =?UTF-8?q?fix(=E7=A7=BB=E5=8A=A8=E7=AB=AF):=20?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=9D=90=E6=A0=87=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/mobile/panel/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/views/mobile/panel/index.vue b/core/core-frontend/src/views/mobile/panel/index.vue index 7e69bd72b5..859f25e983 100644 --- a/core/core-frontend/src/views/mobile/panel/index.vue +++ b/core/core-frontend/src/views/mobile/panel/index.vue @@ -9,11 +9,11 @@ const dvMainStore = dvMainStoreWithOut() const checkItemPosition = component => { component.x = 1 - component.sizeX = 36 + component.sizeX = 72 component.y = dvMainStore.componentData.reduce((pre, next) => { return Math.max(pre, next.y + next.sizeY) }, 1) - component.sizeY = 10 + component.sizeY = 20 } const hanedleMessage = event => { From f58b0aedb3741e221e3277aed51bf99366bd90b0 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 22 Apr 2024 15:58:25 +0800 Subject: [PATCH 53/66] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6)?= =?UTF-8?q?:=20=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=80=BC=E6=97=B6=E9=BB=98=E8=AE=A4=E5=A1=AB=E5=85=85=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/v-query/QueryConditionConfiguration.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index 736c5b67ab..9a2f84bfa0 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -248,6 +248,9 @@ const handleDatasetChange = () => { const handleFieldChange = () => { if (!curComponent.value.defaultValueCheck) return curComponent.value.defaultValue = curComponent.value.multiple ? [] : undefined + if (!curComponent.value.displayId) { + curComponent.value.displayId = curComponent.value.field.id + } } const handleValueSourceChange = () => { From 05c5b5b589785745d14e5ffac577df93806ba63d Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 22 Apr 2024 16:16:30 +0800 Subject: [PATCH 54/66] =?UTF-8?q?refactor(=E5=9B=BE=E8=A1=A8):=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BF=AE=E6=94=B9=E5=85=AC=E5=85=B1=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=A2=9E=E5=8A=A0=E5=9B=BE=E6=A0=87=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/svg/dv-style-activeFont.svg | 1 + .../assets/svg/dv-style-backgroundColor.svg | 1 + .../src/assets/svg/dv-style-borderColor.svg | 1 + .../common/CommonStyleSet.vue | 128 ++++++++++-------- 4 files changed, 75 insertions(+), 56 deletions(-) create mode 100644 core/core-frontend/src/assets/svg/dv-style-activeFont.svg create mode 100644 core/core-frontend/src/assets/svg/dv-style-backgroundColor.svg create mode 100644 core/core-frontend/src/assets/svg/dv-style-borderColor.svg diff --git a/core/core-frontend/src/assets/svg/dv-style-activeFont.svg b/core/core-frontend/src/assets/svg/dv-style-activeFont.svg new file mode 100644 index 0000000000..8fe1bc3b1e --- /dev/null +++ b/core/core-frontend/src/assets/svg/dv-style-activeFont.svg @@ -0,0 +1 @@ + diff --git a/core/core-frontend/src/assets/svg/dv-style-backgroundColor.svg b/core/core-frontend/src/assets/svg/dv-style-backgroundColor.svg new file mode 100644 index 0000000000..84188fe32e --- /dev/null +++ b/core/core-frontend/src/assets/svg/dv-style-backgroundColor.svg @@ -0,0 +1 @@ + diff --git a/core/core-frontend/src/assets/svg/dv-style-borderColor.svg b/core/core-frontend/src/assets/svg/dv-style-borderColor.svg new file mode 100644 index 0000000000..3cb03b1910 --- /dev/null +++ b/core/core-frontend/src/assets/svg/dv-style-borderColor.svg @@ -0,0 +1 @@ + diff --git a/core/core-frontend/src/custom-component/common/CommonStyleSet.vue b/core/core-frontend/src/custom-component/common/CommonStyleSet.vue index e6e177e4f9..2a05ae332d 100644 --- a/core/core-frontend/src/custom-component/common/CommonStyleSet.vue +++ b/core/core-frontend/src/custom-component/common/CommonStyleSet.vue @@ -19,6 +19,8 @@ :title="t('chart.text_color')" v-model="styleForm[styleColorKey.value]" class="color-picker-style" + :prefix-icon="expandIcon(styleColorKey.icon)" + :triggerWidth="styleColorKey.width" is-custom :predefine="state.predefineColors" @change="changeStyle" @@ -128,48 +130,50 @@ -