From cc3f9a86b858ad9fa9b974f907d4bf35155ceb6a Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 9 Nov 2022 17:06:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):=20=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E4=B8=AD=E8=BF=87=E6=BB=A4=E5=A2=9E=E5=8A=A0=E6=95=B0=E5=80=BC?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/dragItem/utils.js | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/chart/components/dragItem/utils.js b/frontend/src/views/chart/components/dragItem/utils.js index b2ab4bb007..2fb419f6f8 100644 --- a/frontend/src/views/chart/components/dragItem/utils.js +++ b/frontend/src/views/chart/components/dragItem/utils.js @@ -10,18 +10,32 @@ export function getItemType(dimensionData, quotaData, item) { if (status === 'd') { for (let i = 0; i < dimensionData.length; i++) { const ele = dimensionData[i] - if (((item.chartId && item.extField === 2 && item.tableId === ele.tableId) || ele.id === item.id) && ele.deType === item.deType && ele.groupType === item.groupType) { - checked = true - break + if (item.chartId) { + if (ele.dataeaseName === item.dataeaseName && ele.deType === item.deType && ele.groupType === item.groupType) { + checked = true + break + } + } else { + if (ele.id === item.id && ele.deType === item.deType && ele.groupType === item.groupType) { + checked = true + break + } } } } if (status === 'q') { for (let i = 0; i < quotaData.length; i++) { const ele = quotaData[i] - if (((item.chartId && item.extField === 2 && item.tableId === ele.tableId) || ele.id === item.id) && ele.deType === item.deType && ele.groupType === item.groupType) { - checked = true - break + if (item.chartId) { + if (ele.dataeaseName === item.dataeaseName && ele.deType === item.deType && ele.groupType === item.groupType) { + checked = true + break + } + } else { + if (ele.id === item.id && ele.deType === item.deType && ele.groupType === item.groupType) { + checked = true + break + } } } }