From 12592658496a32992a6ca3a3a3fae64ccc860146 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 3 Jun 2024 16:25:29 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix(X-Pack):=20=E5=AE=9A=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E5=AF=BC=E7=AB=8B=E5=8D=B3=E6=89=A7=E8=A1=8C=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=81=B6=E5=B0=94=E6=97=A0=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- de-xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/de-xpack b/de-xpack index 1edc0e30b8..a757c13fbe 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 1edc0e30b8e8c4f3045cd2b5ff6b90598d833b7e +Subproject commit a757c13fbe173935936d7a0b575a8801c79def21 From 030781e4b6038407580ad1c3c59a9a9bf23e7546 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Mon, 3 Jun 2024 16:49:57 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=89=B9=E9=87=8F=E7=BC=96=E8=BE=91=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=8C=89=E9=92=AE=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/editor-style/components/BasicStyleSelector.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue index 392a5e099c..a331eb2a7d 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/BasicStyleSelector.vue @@ -560,7 +560,7 @@ onMounted(() => { :effect="themes" v-model="state.basicStyleForm.showZoom" :predefine="predefineColors" - @change="changeBasicStyle('zoomShow')" + @change="changeBasicStyle('showZoom')" > {{ t('chart.show_zoom') }} From 463c015dc8c49500c2ce06bdfabb6c72e5740b09 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 3 Jun 2024 17:15:19 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90):=20=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E3=80=81=E6=95=B0=E6=8D=AE=E6=BA=90=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=88=87=E6=8D=A2=E9=A1=B5=E9=9D=A2=E5=90=8E?= =?UTF-8?q?=E4=BC=9A=E5=8F=98=E5=8C=96=20#10023?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/visualized/data/dataset/index.vue | 13 +++++++++++++ .../views/visualized/data/datasource/index.vue | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/visualized/data/dataset/index.vue b/core/core-frontend/src/views/visualized/data/dataset/index.vue index 08d42c6066..eb7842987c 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/index.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/index.vue @@ -35,7 +35,9 @@ import type { TabPaneName } from 'element-plus-secondary' import { timestampFormatDate } from './form/util' import { interactiveStoreWithOut } from '@/store/modules/interactive' import { XpackComponent } from '@/components/plugin' +import { useCache } from '@/hooks/web/useCache' const interactiveStore = interactiveStoreWithOut() +const { wsCache } = useCache() interface Field { fieldShortName: string name: string @@ -86,6 +88,7 @@ let originResourceTree = [] const sortTypeChange = sortType => { state.datasetTree = treeSort(originResourceTree, sortType) state.curSortType = sortType + wsCache.set('TreeSort-dataset', state.curSortType) } const resourceCreate = (pid, name) => { @@ -211,10 +214,12 @@ const getData = () => { rootManage.value = nodeData[0]['weight'] >= 7 state.datasetTree = nodeData[0]['children'] || [] originResourceTree = cloneDeep(unref(state.datasetTree)) + sortTypeChange(state.curSortType) return } state.datasetTree = nodeData originResourceTree = cloneDeep(unref(state.datasetTree)) + sortTypeChange(state.curSortType) }) .finally(() => { dtLoading.value = false @@ -252,6 +257,7 @@ const dfsDatasetTree = (ds, id) => { onBeforeMount(() => { nodeInfo.id = (route.params.id as string) || '' + loadInit() getData() }) @@ -471,6 +477,13 @@ const sortList = [ } ] +const loadInit = () => { + const historyTreeSort = wsCache.get('TreeSort-dataset') + if (historyTreeSort) { + state.curSortType = historyTreeSort + } +} + const sortTypeTip = computed(() => { return sortList.find(ele => ele.value === state.curSortType).name }) diff --git a/core/core-frontend/src/views/visualized/data/datasource/index.vue b/core/core-frontend/src/views/visualized/data/datasource/index.vue index 0b73b41847..9330f2efcb 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/index.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/index.vue @@ -42,6 +42,7 @@ import { useMoveLine } from '@/hooks/web/useMoveLine' import { cloneDeep } from 'lodash-es' import { interactiveStoreWithOut } from '@/store/modules/interactive' import treeSort from '@/utils/treeSortUtils' +import { useCache } from '@/hooks/web/useCache' const route = useRoute() const interactiveStore = interactiveStoreWithOut() interface Field { @@ -51,7 +52,7 @@ interface Field { originName: string deType: number } - +const { wsCache } = useCache() const { t } = useI18n() const router = useRouter() const appStore = useAppStoreWithOut() @@ -165,6 +166,7 @@ let originResourceTree = [] const sortTypeChange = sortType => { state.datasourceTree = treeSort(originResourceTree, sortType) state.curSortType = sortType + wsCache.set('TreeSort-datasource', state.curSortType) } const handleSizeChange = pageSize => { state.paginationConfig.currentPage = 1 @@ -391,10 +393,12 @@ const listDs = () => { rootManage.value = nodeData[0]['weight'] >= 7 state.datasourceTree = nodeData[0]['children'] || [] originResourceTree = cloneDeep(unref(state.datasourceTree)) + sortTypeChange(state.curSortType) return } originResourceTree = cloneDeep(unref(state.datasourceTree)) state.datasourceTree = nodeData + sortTypeChange(state.curSortType) }) .finally(() => { mounted.value = true @@ -693,8 +697,17 @@ const defaultProps = { children: 'children', label: 'name' } + +const loadInit = () => { + const historyTreeSort = wsCache.get('TreeSort-datasource') + if (historyTreeSort) { + state.curSortType = historyTreeSort + } +} + onMounted(() => { nodeInfo.id = (route.params.id as string) || '' + loadInit() listDs() const { opt } = router.currentRoute.value.query if (opt && opt === 'create') { From 151e3aef43a53f9310f52fc5a583adc472db6dc4 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Mon, 3 Jun 2024 18:02:21 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=A4=9A=E7=B3=BB=E5=88=97=E6=A0=87=E7=AD=BE=E5=92=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E6=9C=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/utils/canvasStyle.ts | 30 ++++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/core/core-frontend/src/utils/canvasStyle.ts b/core/core-frontend/src/utils/canvasStyle.ts index 7b5b7b0896..92942dbf59 100644 --- a/core/core-frontend/src/utils/canvasStyle.ts +++ b/core/core-frontend/src/utils/canvasStyle.ts @@ -125,8 +125,14 @@ export const customAttrTrans = { 'wordSizeRange', 'wordSpacing' ], - label: ['fontSize'], - tooltip: ['fontSize'], + label: { + fontSize: '', + seriesLabelFormatter: ['fontSize'] + }, + tooltip: { + fontSize: '', + seriesTooltipFormatter: ['fontSize'] + }, indicator: ['fontSize', 'suffixFontSize'], indicatorName: ['fontSize', 'nameValueSpacing'] } @@ -296,15 +302,25 @@ export function recursionTransObj(template, infoObj, scale, terminal) { // 如果是数组 进行赋值计算 if (template[templateKey] instanceof Array) { template[templateKey].forEach(templateProp => { - if (infoObj[templateKey] && infoObj[templateKey][templateProp]) { + if ( + infoObj[templateKey] && + (infoObj[templateKey][templateProp] || infoObj[templateKey].length) + ) { // 移动端特殊属性值设置 if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined) { infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp] } else { - infoObj[templateKey][templateProp] = getScaleValue( - infoObj[templateKey][templateProp], - scale - ) + // 数组依次设置 + if (infoObj[templateKey] instanceof Array) { + infoObj[templateKey].forEach(v => { + v[templateProp] = getScaleValue(v[templateProp], scale) + }) + } else { + infoObj[templateKey][templateProp] = getScaleValue( + infoObj[templateKey][templateProp], + scale + ) + } } } }) From 014cd2adf022cdd6f5d4d622822afd35de56834f Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 3 Jun 2024 18:06:32 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E9=80=89=E5=9B=BE=E5=B1=82?= =?UTF-8?q?=EF=BC=8C=E7=BB=84=E5=90=88=E7=A7=BB=E5=8A=A8=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E8=BF=94=E5=9B=9E=EF=BC=8C=E5=A4=9A=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=9B=BE=E5=B1=82=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/data-visualization/DvToolbar.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue index 40dceb75cb..ee8b0a78f0 100644 --- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue +++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue @@ -93,10 +93,13 @@ const saveCanvasWithCheck = () => { const saveResource = () => { wsCache.delete('DE-DV-CATCH-' + dvInfo.value.id) if (styleChangeTimes.value > 0) { - snapshotStore.resetStyleChangeTimes() - canvasSave(() => { - ElMessage.success('保存成功') - window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`) + eventBus.emit('hideArea-canvas-main') + nextTick(() => { + snapshotStore.resetStyleChangeTimes() + canvasSave(() => { + ElMessage.success('保存成功') + window.history.pushState({}, '', `#/dvCanvas?dvId=${dvInfo.value.id}`) + }) }) } } From 90bddd454a62b20c1c11bab650be710c0058e258 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 3 Jun 2024 18:15:51 +0800 Subject: [PATCH 6/7] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):?= =?UTF-8?q?=20=E6=96=B0=E5=BB=BA=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B7=91=E9=A9=AC=E7=81=AF=EF=BC=8C=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E7=84=A6=E7=82=B9=E4=BB=8E=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0=E8=BE=93=E5=85=A5=E6=A1=86=E5=A4=96?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=A1=AE=E5=AE=9A=EF=BC=8C=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E5=86=85=E5=AD=98=E5=9C=A8 ?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/scroll-text/Component.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/custom-component/scroll-text/Component.vue b/core/core-frontend/src/custom-component/scroll-text/Component.vue index 3e7dd1b6ee..c15a17f90c 100644 --- a/core/core-frontend/src/custom-component/scroll-text/Component.vue +++ b/core/core-frontend/src/custom-component/scroll-text/Component.vue @@ -81,14 +81,14 @@ const clearStyle = e => { } const handleBlur = e => { - element.value.propValue = e.target.innerHTML || ' ' + element.value.propValue = e.target.innerHTML || '' const html = e.target.innerHTML if (html !== '') { element.value.propValue = e.target.innerHTML } else { element.value.propValue = '' nextTick(function () { - element.value.propValue = ' ' + element.value.propValue = '' }) } canEdit.value = false From 4df576843a8f0cf4990b95c77a4644d5d86f003e Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Mon, 3 Jun 2024 18:29:54 +0800 Subject: [PATCH 7/7] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BB=AA=E8=A1=A8=E7=9B=98=E5=92=8C=E6=B0=B4=E6=B3=A2?= =?UTF-8?q?=E5=9B=BE=E9=98=88=E5=80=BC=E5=8C=BA=E9=97=B4=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E8=A7=84=E5=88=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/editor-senior/components/Threshold.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue index 91157a90b7..2047acb07b 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-senior/components/Threshold.vue @@ -64,10 +64,15 @@ const changeThreshold = () => { const changeSplitThreshold = (threshold: string) => { // check input if (threshold) { + const regex = /^(\d+)(,\d+)*$/ + if (!regex.test(threshold)) { + ElMessage.error(t('chart.gauge_threshold_format_error')) + return + } const arr = threshold.split(',') for (let i = 0; i < arr.length; i++) { const ele = arr[i] - if (parseFloat(ele).toString() === 'NaN' || parseFloat(ele) <= 0 || parseFloat(ele) >= 100) { + if (parseFloat(ele) <= 0 || parseFloat(ele) >= 100) { ElMessage.error(t('chart.gauge_threshold_format_error')) return }