From e1ae7dc7fbde272b03cb59cd1344bb87ec2e6fa2 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 13 Apr 2023 15:41:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix(=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A):?= =?UTF-8?q?=20=E5=AF=BC=E5=87=BA=E8=A7=86=E5=9B=BE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=8C=85=E5=90=AB"/"=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/commons/utils/ExcelUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java b/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java index e03382babe..69ed9f81ac 100644 --- a/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java +++ b/backend/src/main/java/io/dataease/commons/utils/ExcelUtils.java @@ -8,6 +8,8 @@ import io.dataease.commons.model.excel.ExcelSheetModel; import java.util.List; import java.util.concurrent.atomic.AtomicReference; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -29,6 +31,9 @@ public class ExcelUtils { List> details = sheet.getData(); details.add(0, sheet.getHeads()); String sheetName = sheet.getSheetName(); + Pattern pattern = Pattern.compile("[\\s\\\\/:\\*\\?\\\"<>\\|]"); + Matcher matcher = pattern.matcher(sheetName); + sheetName = matcher.replaceAll("-"); Sheet curSheet = wb.createSheet(sheetName); if (StringUtils.isBlank(fileName)) { String cName = sheetName + suffix; From deb1219180ef5a1f69d664147979da111d215f42 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 13 Apr 2023 16:10:46 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix(=E5=AE=9A=E6=97=B6=E6=8A=A5=E5=91=8A):?= =?UTF-8?q?=20=E4=BD=BF=E7=94=A8=E6=A8=A1=E7=89=88=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=95=B0=E6=8D=AE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/service/chart/ViewExportExcel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java b/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java index d442916cf0..a0eafb69f1 100644 --- a/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java +++ b/backend/src/main/java/io/dataease/service/chart/ViewExportExcel.java @@ -63,7 +63,7 @@ public class ViewExportExcel { String panelStyle = panelDto.getPanelStyle(); Map map = gson.fromJson(panelStyle, Map.class); Map panelMap = (LinkedTreeMap) map.get("panel"); - double resultCount = Double.parseDouble(panelMap.get("resultCount").toString()); + double resultCount = ObjectUtils.isEmpty(panelMap.get("resultCount")) ? 1000 : Double.parseDouble(panelMap.get("resultCount").toString()); String resultMode = null; if (ObjectUtils.isNotEmpty(panelMap.get("resultMode"))) { resultMode = panelMap.get("resultMode").toString(); From 089e4145eca27ffe9dd2a657fa0cceb05483cb44 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Thu, 13 Apr 2023 16:23:30 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix(AntV=E6=8A=98=E7=BA=BF=E5=9B=BE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E7=BB=B4=E5=BA=A6=E4=B8=8B=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E7=9A=84=E6=8F=90=E7=A4=BA=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/chart/common/common_antv.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/chart/common/common_antv.js b/frontend/src/views/chart/chart/common/common_antv.js index bae3ce1b60..949381b507 100644 --- a/frontend/src/views/chart/chart/common/common_antv.js +++ b/frontend/src/views/chart/chart/common/common_antv.js @@ -364,7 +364,7 @@ export function getTooltip(chart) { res = valueFormatter(param.value, formatterItem) } } - } else if (includesAny(chart.type, 'bar', 'line', 'scatter', 'radar', 'area') && !chart.type.includes('group')) { + } else if (includesAny(chart.type, 'bar', 'scatter', 'radar', 'area') && !chart.type.includes('group')) { obj = { name: param.category, value: param.value } for (let i = 0; i < yAxis.length; i++) { const f = yAxis[i] @@ -377,6 +377,20 @@ export function getTooltip(chart) { break } } + } else if (chart.type === 'line') { + obj = { name: param.category, value: param.value } + const xAxisExt = JSON.parse(chart.xaxisExt) + for (let i = 0; i < yAxis.length; i++) { + const f = yAxis[i] + if (f.name === param.category || (yAxis.length && xAxisExt.length)) { + if (f.formatterCfg) { + res = valueFormatter(param.value, f.formatterCfg) + } else { + res = valueFormatter(param.value, formatterItem) + } + break + } + } } else if (chart.type.includes('group')) { if (chart.type === 'bar-group') { obj = { name: param.category, value: param.value } From 55bc0b10e12fd16c9acb428c7e8c66725e85a983 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Thu, 13 Apr 2023 17:28:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=83=A8=E5=88=86=E8=A7=86=E5=9B=BE=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/util.js | 26 ++++++++++--------- .../functionStyle/MapMarkSelector.vue | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js index 224c1c11f4..6217ad80c3 100644 --- a/frontend/src/views/chart/chart/util.js +++ b/frontend/src/views/chart/chart/util.js @@ -3367,19 +3367,21 @@ export function getColors(chart, colors, reset) { } } else if (equalsAny(chart.type, 'bar-group', 'line')) { // 拿到data中的category,并去重,然后构建seriesColor - const data = chart.data.data - const s = [] - data.forEach((cur) => { - if (s.indexOf(cur.category) < 0) { - s.push(cur.category) - } - }) - for (let i = 0; i < s.length; i++) { - seriesColors.push({ - name: s[i], - color: colors[i % colors.length], - isCustom: false + if (chart.data) { + const data = chart.data.data + const s = [] + data.forEach((cur) => { + if (s.indexOf(cur.category) < 0) { + s.push(cur.category) + } }) + for (let i = 0; i < s.length; i++) { + seriesColors.push({ + name: s[i], + color: colors[i % colors.length], + isCustom: false + }) + } } } else { if (chart.data) { diff --git a/frontend/src/views/chart/components/functionStyle/MapMarkSelector.vue b/frontend/src/views/chart/components/functionStyle/MapMarkSelector.vue index 0068368aa7..b670235d88 100644 --- a/frontend/src/views/chart/components/functionStyle/MapMarkSelector.vue +++ b/frontend/src/views/chart/components/functionStyle/MapMarkSelector.vue @@ -243,7 +243,7 @@ export default { fieldOptions() { const xaxis = this.view.xaxis const yaxis = this.view.yaxis - const locationIds = this.view.viewFields.filter(item => item.busiType === 'locationXaxis' || item.busiType === 'locationYaxis').map(item => item.id) + const locationIds = this.view.viewFields ? this.view.viewFields.filter(item => item.busiType === 'locationXaxis' || item.busiType === 'locationYaxis').map(item => item.id) : [] const xIds = xaxis ? xaxis.map(item => item.id) : [] const yIds = yaxis ? yaxis.map(item => item.id) : [] const disableIds = [...xIds, ...yIds, ...locationIds]