From 468a2ed194591d87485e2d4ad40c6731f706d1bf Mon Sep 17 00:00:00 2001 From: junjun Date: Tue, 1 Mar 2022 10:50:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BE=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=AA=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/view/ChartEdit.vue | 22 +++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 818637badb..5b59684eff 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1952,13 +1952,17 @@ export default { } } }, - dragMoveDuplicate(list, e) { - const that = this - const dup = list.filter(function(m) { - return m.id === that.moveId - }) - if (dup && dup.length > 1) { + dragMoveDuplicate(list, e, mode) { + if (mode === 'ds') { list.splice(e.newDraggableIndex, 1) + } else { + const that = this + const dup = list.filter(function(m) { + return m.id === that.moveId + }) + if (dup && dup.length > 1) { + list.splice(e.newDraggableIndex, 1) + } } }, addXaxis(e) { @@ -1998,13 +2002,11 @@ export default { this.calcData(true) }, moveToDimension(e) { - this.dragCheckType(this.dimensionData, 'd') - this.dragMoveDuplicate(this.dimensionData, e) + this.dragMoveDuplicate(this.dimensionData, e, 'ds') this.calcData(true) }, moveToQuota(e) { - this.dragCheckType(this.quotaData, 'q') - this.dragMoveDuplicate(this.quotaData, e) + this.dragMoveDuplicate(this.quotaData, e, 'ds') this.calcData(true) }, addCustomFilter(e) { From e188e4a7b3e624e4b75c5321300948c9e8630671 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 1 Mar 2022 11:14:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E9=87=8D=E5=90=8D=E7=9B=B4=E6=8E=A5=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/panel/PanelGroupService.java | 17 ++++++----------- frontend/src/views/panel/list/PanelViewShow.vue | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java index b598aa41c1..8272aeff23 100644 --- a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java +++ b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java @@ -130,12 +130,7 @@ public class PanelGroupService { checkPanelName(newDefaultPanel.getName(), newDefaultPanel.getPid(), PanelConstants.OPT_TYPE_INSERT, newDefaultPanel.getId(), newDefaultPanel.getNodeType()); panelGroupMapper.insertSelective(newDefaultPanel); } else if ("copy".equals(request.getOptType())) { - try { - panelId = this.panelGroupCopy(request, null, true); - } catch (Exception e) { - e.printStackTrace(); - LOGGER.error("更新panelView出错panelId:{}", request.getId()); - } + panelId = this.panelGroupCopy(request, null, true); } else if ("move".equals(request.getOptType())) { PanelGroupWithBLOBs panelInfo = panelGroupMapper.selectByPrimaryKey(request.getId()); if (panelInfo.getPid().equalsIgnoreCase(request.getPid())) { @@ -206,9 +201,9 @@ public class PanelGroupService { public PanelGroupWithBLOBs findOne(String panelId) { - PanelGroupWithBLOBs panelGroupWithBLOBs = extPanelGroupMapper.findOneWithPrivileges(panelId,String.valueOf(AuthUtils.getUser().getUserId())); + PanelGroupWithBLOBs panelGroupWithBLOBs = extPanelGroupMapper.findOneWithPrivileges(panelId, String.valueOf(AuthUtils.getUser().getUserId())); if (panelGroupWithBLOBs != null && StringUtils.isNotEmpty(panelGroupWithBLOBs.getSource())) { - return extPanelGroupMapper.findOneWithPrivileges(panelGroupWithBLOBs.getSource(),String.valueOf(AuthUtils.getUser().getUserId())); + return extPanelGroupMapper.findOneWithPrivileges(panelGroupWithBLOBs.getSource(), String.valueOf(AuthUtils.getUser().getUserId())); } return panelGroupWithBLOBs; } @@ -247,7 +242,7 @@ public class PanelGroupService { if (AuthUtils.getUser().getIsAdmin()) { // 原有视图的目录结构 List viewOriginal = extVAuthModelMapper.queryAuthViewsOriginal(viewRequest); - if (CollectionUtils.isNotEmpty(viewOriginal) && viewOriginal.size() > 1 ) { + if (CollectionUtils.isNotEmpty(viewOriginal) && viewOriginal.size() > 1) { result.addAll(TreeUtils.mergeTree(viewOriginal, "public_chart")); } } @@ -328,9 +323,9 @@ public class PanelGroupService { //TODO 复制联动信息 copy panel_view_linkage_field panel_view_linkage extPanelViewLinkageMapper.copyViewLinkage(copyId); extPanelViewLinkageMapper.copyViewLinkageField(copyId); - }catch (Exception e){ + } catch (Exception e) { e.printStackTrace(); - System.out.println("错误===》panel:"+panelGroupDTO.getId()+";panelView:"+ JSON.toJSONString(panelViewtemp)); + System.out.println("错误===》panel:" + panelGroupDTO.getId() + ";panelView:" + JSON.toJSONString(panelViewtemp)); } } } diff --git a/frontend/src/views/panel/list/PanelViewShow.vue b/frontend/src/views/panel/list/PanelViewShow.vue index 7372521f98..9e5fe6c2ae 100644 --- a/frontend/src/views/panel/list/PanelViewShow.vue +++ b/frontend/src/views/panel/list/PanelViewShow.vue @@ -169,8 +169,8 @@ export default { imageWrapperStyle() { if (this.exporting) { return { - width: '4096px', - height: '2160px' + width: '2560px', + height: '1440px' } } else { return {