提交 665cd7ee authored 作者: taojinlong's avatar taojinlong

Merge branch 'v1.8' of github.com:dataease/dataease into v1.8

...@@ -130,12 +130,7 @@ public class PanelGroupService { ...@@ -130,12 +130,7 @@ public class PanelGroupService {
checkPanelName(newDefaultPanel.getName(), newDefaultPanel.getPid(), PanelConstants.OPT_TYPE_INSERT, newDefaultPanel.getId(), newDefaultPanel.getNodeType()); checkPanelName(newDefaultPanel.getName(), newDefaultPanel.getPid(), PanelConstants.OPT_TYPE_INSERT, newDefaultPanel.getId(), newDefaultPanel.getNodeType());
panelGroupMapper.insertSelective(newDefaultPanel); panelGroupMapper.insertSelective(newDefaultPanel);
} else if ("copy".equals(request.getOptType())) { } else if ("copy".equals(request.getOptType())) {
try { panelId = this.panelGroupCopy(request, null, true);
panelId = this.panelGroupCopy(request, null, true);
} catch (Exception e) {
e.printStackTrace();
LOGGER.error("更新panelView出错panelId:{}", request.getId());
}
} else if ("move".equals(request.getOptType())) { } else if ("move".equals(request.getOptType())) {
PanelGroupWithBLOBs panelInfo = panelGroupMapper.selectByPrimaryKey(request.getId()); PanelGroupWithBLOBs panelInfo = panelGroupMapper.selectByPrimaryKey(request.getId());
if (panelInfo.getPid().equalsIgnoreCase(request.getPid())) { if (panelInfo.getPid().equalsIgnoreCase(request.getPid())) {
...@@ -206,9 +201,9 @@ public class PanelGroupService { ...@@ -206,9 +201,9 @@ public class PanelGroupService {
public PanelGroupWithBLOBs findOne(String panelId) { 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())) { 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; return panelGroupWithBLOBs;
} }
...@@ -247,7 +242,7 @@ public class PanelGroupService { ...@@ -247,7 +242,7 @@ public class PanelGroupService {
if (AuthUtils.getUser().getIsAdmin()) { if (AuthUtils.getUser().getIsAdmin()) {
// 原有视图的目录结构 // 原有视图的目录结构
List<VAuthModelDTO> viewOriginal = extVAuthModelMapper.queryAuthViewsOriginal(viewRequest); List<VAuthModelDTO> 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")); result.addAll(TreeUtils.mergeTree(viewOriginal, "public_chart"));
} }
} }
...@@ -328,9 +323,9 @@ public class PanelGroupService { ...@@ -328,9 +323,9 @@ public class PanelGroupService {
//TODO 复制联动信息 copy panel_view_linkage_field panel_view_linkage //TODO 复制联动信息 copy panel_view_linkage_field panel_view_linkage
extPanelViewLinkageMapper.copyViewLinkage(copyId); extPanelViewLinkageMapper.copyViewLinkage(copyId);
extPanelViewLinkageMapper.copyViewLinkageField(copyId); extPanelViewLinkageMapper.copyViewLinkageField(copyId);
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
System.out.println("错误===》panel:"+panelGroupDTO.getId()+";panelView:"+ JSON.toJSONString(panelViewtemp)); System.out.println("错误===》panel:" + panelGroupDTO.getId() + ";panelView:" + JSON.toJSONString(panelViewtemp));
} }
} }
} }
......
...@@ -1952,13 +1952,17 @@ export default { ...@@ -1952,13 +1952,17 @@ export default {
} }
} }
}, },
dragMoveDuplicate(list, e) { dragMoveDuplicate(list, e, mode) {
const that = this if (mode === 'ds') {
const dup = list.filter(function(m) {
return m.id === that.moveId
})
if (dup && dup.length > 1) {
list.splice(e.newDraggableIndex, 1) 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) { addXaxis(e) {
...@@ -1998,13 +2002,11 @@ export default { ...@@ -1998,13 +2002,11 @@ export default {
this.calcData(true) this.calcData(true)
}, },
moveToDimension(e) { moveToDimension(e) {
this.dragCheckType(this.dimensionData, 'd') this.dragMoveDuplicate(this.dimensionData, e, 'ds')
this.dragMoveDuplicate(this.dimensionData, e)
this.calcData(true) this.calcData(true)
}, },
moveToQuota(e) { moveToQuota(e) {
this.dragCheckType(this.quotaData, 'q') this.dragMoveDuplicate(this.quotaData, e, 'ds')
this.dragMoveDuplicate(this.quotaData, e)
this.calcData(true) this.calcData(true)
}, },
addCustomFilter(e) { addCustomFilter(e) {
......
...@@ -169,8 +169,8 @@ export default { ...@@ -169,8 +169,8 @@ export default {
imageWrapperStyle() { imageWrapperStyle() {
if (this.exporting) { if (this.exporting) {
return { return {
width: '4096px', width: '2560px',
height: '2160px' height: '1440px'
} }
} else { } else {
return { return {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论