Merge pull request #1437 from dataease/pr@dev@fix_panel-filter
feat: 仪表板tab组件内视图,支持放大和编辑
This commit is contained in:
commit
791a76ca3c
@ -12,6 +12,7 @@
|
|||||||
<resultMap id="LinkJumpInfoMap" type="io.dataease.dto.panel.linkJump.PanelLinkJumpInfoDTO" extends="io.dataease.base.mapper.PanelLinkJumpInfoMapper.BaseResultMap">
|
<resultMap id="LinkJumpInfoMap" type="io.dataease.dto.panel.linkJump.PanelLinkJumpInfoDTO" extends="io.dataease.base.mapper.PanelLinkJumpInfoMapper.BaseResultMap">
|
||||||
<result column="source_field_id" jdbcType="VARCHAR" property="sourceFieldId"/>
|
<result column="source_field_id" jdbcType="VARCHAR" property="sourceFieldId"/>
|
||||||
<result column="source_field_name" jdbcType="VARCHAR" property="sourceFieldName"/>
|
<result column="source_field_name" jdbcType="VARCHAR" property="sourceFieldName"/>
|
||||||
|
<result column="publicJumpId" jdbcType="VARCHAR" property="publicJumpId"/>
|
||||||
<collection property="targetViewInfoList" ofType="io.dataease.base.domain.PanelLinkJumpTargetViewInfo">
|
<collection property="targetViewInfoList" ofType="io.dataease.base.domain.PanelLinkJumpTargetViewInfo">
|
||||||
<result column="target_view_id" jdbcType="VARCHAR" property="targetViewId"/>
|
<result column="target_view_id" jdbcType="VARCHAR" property="targetViewId"/>
|
||||||
<result column="target_field_id" jdbcType="VARCHAR" property="targetFieldId"/>
|
<result column="target_field_id" jdbcType="VARCHAR" property="targetFieldId"/>
|
||||||
@ -35,6 +36,7 @@
|
|||||||
panel_link_jump_info.jump_type,
|
panel_link_jump_info.jump_type,
|
||||||
panel_link_jump_info.target_panel_id,
|
panel_link_jump_info.target_panel_id,
|
||||||
panel_link_jump_info.content,
|
panel_link_jump_info.content,
|
||||||
|
panel_link_mapping.id as publicJumpId,
|
||||||
ifnull( panel_link_jump_info.checked, 0 ) AS checked,
|
ifnull( panel_link_jump_info.checked, 0 ) AS checked,
|
||||||
panel_link_jump_target_view_info.target_view_id,
|
panel_link_jump_target_view_info.target_view_id,
|
||||||
panel_link_jump_target_view_info.target_field_id
|
panel_link_jump_target_view_info.target_field_id
|
||||||
@ -45,6 +47,7 @@
|
|||||||
LEFT JOIN panel_link_jump_info ON panel_link_jump.id = panel_link_jump_info.link_jump_id
|
LEFT JOIN panel_link_jump_info ON panel_link_jump.id = panel_link_jump_info.link_jump_id
|
||||||
AND dataset_table_field.id = panel_link_jump_info.source_field_id
|
AND dataset_table_field.id = panel_link_jump_info.source_field_id
|
||||||
LEFT JOIN panel_link_jump_target_view_info ON panel_link_jump_info.id = panel_link_jump_target_view_info.link_jump_info_id
|
LEFT JOIN panel_link_jump_target_view_info ON panel_link_jump_info.id = panel_link_jump_target_view_info.link_jump_info_id
|
||||||
|
LEFT JOIN panel_link_mapping on panel_link_jump_info.target_panel_id = panel_link_mapping.resource_id
|
||||||
WHERE
|
WHERE
|
||||||
chart_view.id =#{source_view_id}
|
chart_view.id =#{source_view_id}
|
||||||
ORDER BY
|
ORDER BY
|
||||||
|
|||||||
@ -19,6 +19,9 @@ public class PanelLinkJumpInfoDTO extends PanelLinkJumpInfo {
|
|||||||
|
|
||||||
private String sourceJumpInfo;
|
private String sourceJumpInfo;
|
||||||
|
|
||||||
|
//存在公共链接的目标仪表板
|
||||||
|
private String publicJumpId;
|
||||||
|
|
||||||
private List<PanelLinkJumpTargetViewInfo> targetViewInfoList=new ArrayList<>();// linkType = inner 时使用
|
private List<PanelLinkJumpTargetViewInfo> targetViewInfoList=new ArrayList<>();// linkType = inner 时使用
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,9 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
'linkageSettingStatus'
|
'linkageSettingStatus',
|
||||||
|
'componentData',
|
||||||
|
'canvasStyleData'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@ -208,7 +208,8 @@ export default {
|
|||||||
...mapState([
|
...mapState([
|
||||||
'canvasStyleData',
|
'canvasStyleData',
|
||||||
'nowPanelTrackInfo',
|
'nowPanelTrackInfo',
|
||||||
'nowPanelJumpInfo'
|
'nowPanelJumpInfo',
|
||||||
|
'publicLinkStatus'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -399,9 +400,23 @@ export default {
|
|||||||
// 内部仪表板跳转
|
// 内部仪表板跳转
|
||||||
if (jumpInfo.linkType === 'inner') {
|
if (jumpInfo.linkType === 'inner') {
|
||||||
if (jumpInfo.targetPanelId) {
|
if (jumpInfo.targetPanelId) {
|
||||||
const url = '#/preview/' + jumpInfo.targetPanelId
|
|
||||||
localStorage.setItem('jumpInfoParam', JSON.stringify(param))
|
localStorage.setItem('jumpInfoParam', JSON.stringify(param))
|
||||||
window.open(url, jumpInfo.jumpType)
|
if (this.publicLinkStatus) {
|
||||||
|
// 判断是否有公共链接ID
|
||||||
|
if (jumpInfo.publicJumpId) {
|
||||||
|
const url = '/link/' + jumpInfo.publicJumpId
|
||||||
|
window.open(url, jumpInfo.jumpType)
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'warn',
|
||||||
|
message: '当前是公共链接模式,目标仪表板未设置公共链接,无法跳转',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const url = '#/preview/' + jumpInfo.targetPanelId
|
||||||
|
window.open(url, jumpInfo.jumpType)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warn',
|
type: 'warn',
|
||||||
|
|||||||
@ -79,6 +79,8 @@ const data = {
|
|||||||
componentGap: 5,
|
componentGap: 5,
|
||||||
// 移动端布局状态
|
// 移动端布局状态
|
||||||
mobileLayoutStatus: false,
|
mobileLayoutStatus: false,
|
||||||
|
// 公共链接状态(当前是否是公共链接打开)
|
||||||
|
publicLinkStatus: false,
|
||||||
pcMatrixCount: {
|
pcMatrixCount: {
|
||||||
x: 36,
|
x: 36,
|
||||||
y: 18
|
y: 18
|
||||||
@ -326,6 +328,9 @@ const data = {
|
|||||||
setMobileLayoutStatus(state, status) {
|
setMobileLayoutStatus(state, status) {
|
||||||
state.mobileLayoutStatus = status
|
state.mobileLayoutStatus = status
|
||||||
},
|
},
|
||||||
|
setPublicLinkStatus(state, status) {
|
||||||
|
state.publicLinkStatus = status
|
||||||
|
},
|
||||||
// 启用移动端布局
|
// 启用移动端布局
|
||||||
openMobileLayout(state) {
|
openMobileLayout(state) {
|
||||||
state.componentDataCache = JSON.stringify(state.componentData)
|
state.componentDataCache = JSON.stringify(state.componentData)
|
||||||
|
|||||||
@ -32,6 +32,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
loadInit() {
|
loadInit() {
|
||||||
|
this.$store.commit('setPublicLinkStatus', true)
|
||||||
debugger
|
debugger
|
||||||
// this.link = getQueryVariable(this.PARAMKEY)
|
// this.link = getQueryVariable(this.PARAMKEY)
|
||||||
this.link = this.$route.query.link
|
this.link = this.$route.query.link
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { loadResource } from '@/api/link'
|
|||||||
import { uuid } from 'vue-uuid'
|
import { uuid } from 'vue-uuid'
|
||||||
import Preview from '@/components/canvas/components/Editor/Preview'
|
import Preview from '@/components/canvas/components/Editor/Preview'
|
||||||
import { getPanelAllLinkageInfo } from '@/api/panel/linkage'
|
import { getPanelAllLinkageInfo } from '@/api/panel/linkage'
|
||||||
import { queryPanelJumpInfo } from '@/api/panel/linkJump'
|
import { queryPanelJumpInfo, queryTargetPanelJumpInfo } from '@/api/panel/linkJump'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LinkView',
|
name: 'LinkView',
|
||||||
@ -43,7 +43,27 @@ export default {
|
|||||||
queryPanelJumpInfo(this.resourceId).then(rsp => {
|
queryPanelJumpInfo(this.resourceId).then(rsp => {
|
||||||
this.$store.commit('setNowPanelJumpInfo', rsp.data)
|
this.$store.commit('setNowPanelJumpInfo', rsp.data)
|
||||||
})
|
})
|
||||||
this.show = true
|
// 如果含有跳转参数 进行触发
|
||||||
|
const tempParam = localStorage.getItem('jumpInfoParam')
|
||||||
|
if (tempParam) {
|
||||||
|
localStorage.removeItem('jumpInfoParam')
|
||||||
|
const jumpParam = JSON.parse(tempParam)
|
||||||
|
const jumpRequestParam = {
|
||||||
|
sourcePanelId: jumpParam.sourcePanelId,
|
||||||
|
sourceViewId: jumpParam.sourceViewId,
|
||||||
|
sourceFieldId: jumpParam.sourceFieldId,
|
||||||
|
targetPanelId: this.panelId
|
||||||
|
}
|
||||||
|
this.show = false
|
||||||
|
// 刷新跳转目标仪表板联动信息
|
||||||
|
queryTargetPanelJumpInfo(jumpRequestParam).then(rsp => {
|
||||||
|
this.show = true
|
||||||
|
this.$store.commit('setNowTargetPanelJumpInfo', rsp.data)
|
||||||
|
this.$store.commit('addViewTrackFilter', jumpParam)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.show = true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetID(data) {
|
resetID(data) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user