Unverified 提交 c013e923 authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #707 from dataease/refactor_demo-add

Refactor demo add
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
))) )))
WHERE WHERE
sys_auth_detail.privilege_value = 1 sys_auth_detail.privilege_value = 1
AND sys_auth.auth_source_type = 'chart' AND sys_auth.auth_source_type = 'link'
AND ( AND (
( (
sys_auth.auth_target_type = 'dept' sys_auth.auth_target_type = 'dept'
......
package io.dataease.service.panel; package io.dataease.service.panel;
import io.dataease.base.domain.PanelGroupWithBLOBs;
import io.dataease.base.domain.PanelViewLinkage; import io.dataease.base.domain.PanelViewLinkage;
import io.dataease.base.domain.PanelViewLinkageField; import io.dataease.base.domain.PanelViewLinkageField;
import io.dataease.base.mapper.PanelGroupMapper;
import io.dataease.base.mapper.PanelViewLinkageFieldMapper; import io.dataease.base.mapper.PanelViewLinkageFieldMapper;
import io.dataease.base.mapper.PanelViewLinkageMapper; import io.dataease.base.mapper.PanelViewLinkageMapper;
import io.dataease.base.mapper.ext.ExtPanelViewLinkageMapper; import io.dataease.base.mapper.ext.ExtPanelViewLinkageMapper;
...@@ -10,6 +12,7 @@ import io.dataease.controller.request.panel.PanelLinkageRequest; ...@@ -10,6 +12,7 @@ import io.dataease.controller.request.panel.PanelLinkageRequest;
import io.dataease.dto.LinkageInfoDTO; import io.dataease.dto.LinkageInfoDTO;
import io.dataease.dto.PanelViewLinkageDTO; import io.dataease.dto.PanelViewLinkageDTO;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert; import org.springframework.util.Assert;
...@@ -35,6 +38,9 @@ public class PanelViewLinkageService { ...@@ -35,6 +38,9 @@ public class PanelViewLinkageService {
@Resource @Resource
private ExtPanelViewLinkageMapper extPanelViewLinkageMapper; private ExtPanelViewLinkageMapper extPanelViewLinkageMapper;
@Resource
private PanelGroupMapper panelGroupMapper;
public Map<String, PanelViewLinkageDTO> getViewLinkageGather(PanelLinkageRequest request) { public Map<String, PanelViewLinkageDTO> getViewLinkageGather(PanelLinkageRequest request) {
if(CollectionUtils.isNotEmpty(request.getTargetViewIds())){ if(CollectionUtils.isNotEmpty(request.getTargetViewIds())){
...@@ -92,6 +98,10 @@ public class PanelViewLinkageService { ...@@ -92,6 +98,10 @@ public class PanelViewLinkageService {
} }
public Map<String, List<String>> getPanelAllLinkageInfo(String panelId) { public Map<String, List<String>> getPanelAllLinkageInfo(String panelId) {
PanelGroupWithBLOBs panelInfo = panelGroupMapper.selectByPrimaryKey(panelId);
if(panelInfo!=null && StringUtils.isNotEmpty(panelInfo.getSource())){
panelId=panelInfo.getSource();
}
List<LinkageInfoDTO> info = extPanelViewLinkageMapper.getPanelAllLinkageInfo(panelId); List<LinkageInfoDTO> info = extPanelViewLinkageMapper.getPanelAllLinkageInfo(panelId);
return Optional.ofNullable(info).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(LinkageInfoDTO::getSourceInfo,LinkageInfoDTO::getTargetInfoList)); return Optional.ofNullable(info).orElse(new ArrayList<>()).stream().collect(Collectors.toMap(LinkageInfoDTO::getSourceInfo,LinkageInfoDTO::getTargetInfoList));
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -41,6 +41,14 @@ ...@@ -41,6 +41,14 @@
<el-input v-model="styleInfo.letterSpacing" type="number" size="mini" min="0" max="99" @change="styleChange" /> <el-input v-model="styleInfo.letterSpacing" type="number" size="mini" min="0" max="99" @change="styleChange" />
</div> </div>
<el-tooltip :content="$t('panel.opacity')">
<i style="float: left;margin-top: 3px;margin-left: 2px;" class="icon iconfont icon-touming" />
</el-tooltip>
<div style="width: 70px;float: left;margin-top: 2px;margin-left: 2px;">
<el-input v-model="innerOpacity" type="number" size="mini" min="0" max="100" step="10" @change="styleChange" />
</div>
<div style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;"> <div style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;">
<div style="width: 16px;height: 18px"> <div style="width: 16px;height: 18px">
<el-tooltip :content="$t('panel.color')"> <el-tooltip :content="$t('panel.color')">
...@@ -79,6 +87,7 @@ export default { ...@@ -79,6 +87,7 @@ export default {
}, },
data() { data() {
return { return {
innerOpacity: 0,
textAlignOptions: [ textAlignOptions: [
{ {
icon: 'iconfont icon-juzuo', icon: 'iconfont icon-juzuo',
...@@ -97,8 +106,19 @@ export default { ...@@ -97,8 +106,19 @@ export default {
} }
] } ] }
}, },
watch: {
innerOpacity: {
handler(oldVal, newVal) {
this.styleInfo['opacity'] = this.innerOpacity / 100
}
}
},
mounted() {
if (this.styleInfo['opacity']) {
this.innerOpacity = this.styleInfo['opacity'] * 100
}
},
computed: { computed: {
letterDivColor() { letterDivColor() {
const style = { const style = {
height: '2px', height: '2px',
...@@ -153,7 +173,7 @@ export default { ...@@ -153,7 +173,7 @@ export default {
ps = x + 60 ps = x + 60
} }
// 防止toolbar超出边界 // 防止toolbar超出边界
const xGap = ps + 395 - this.canvasWidth const xGap = ps + 495 - this.canvasWidth
// console.log('canvasWidth:' + this.canvasWidth + ';xGap:' + xGap) // console.log('canvasWidth:' + this.canvasWidth + ';xGap:' + xGap)
if (xGap > 0) { if (xGap > 0) {
return ps - xGap return ps - xGap
...@@ -185,7 +205,7 @@ export default { ...@@ -185,7 +205,7 @@ export default {
.el-card-main { .el-card-main {
height: 34px; height: 34px;
z-index: 10; z-index: 10;
width: 450px; width: 550px;
position: absolute; position: absolute;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论