Merge pull request #9465 from dataease/pr@dev@refactor_panel-jump

refactor(仪表板): 跳转增加时间字段配置时间过滤组件筛选,防止误匹配
This commit is contained in:
王嘉豪 2024-04-29 20:18:23 +08:00 committed by GitHub
commit fc31889ea0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 1 deletions

View File

@ -17,6 +17,8 @@ public class PanelLinkJumpInfoDTO extends PanelLinkJumpInfo {
private String sourceFieldName; private String sourceFieldName;
private Integer sourceFieldType;
private String sourceJumpInfo; private String sourceJumpInfo;
//存在公共链接的目标仪表板 //存在公共链接的目标仪表板

View File

@ -12,6 +12,7 @@
<resultMap id="LinkJumpInfoMap" type="io.dataease.dto.panel.linkJump.PanelLinkJumpInfoDTO" <resultMap id="LinkJumpInfoMap" type="io.dataease.dto.panel.linkJump.PanelLinkJumpInfoDTO"
extends="io.dataease.plugins.common.base.mapper.PanelLinkJumpInfoMapper.BaseResultMap"> extends="io.dataease.plugins.common.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_type" jdbcType="VARCHAR" property="sourceFieldType"/>
<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"/> <result column="publicJumpId" jdbcType="VARCHAR" property="publicJumpId"/>
<collection property="targetViewInfoList" <collection property="targetViewInfoList"
@ -29,7 +30,7 @@
</resultMap> </resultMap>
<select id="getLinkJumpInfo" resultMap="LinkJumpInfoMap"> <select id="getLinkJumpInfo" resultMap="LinkJumpInfoMap">
SELECT dataset_table_field.id AS 'source_field_id', dataset_table_field.NAME AS 'source_field_name', panel_link_jump_info.id, SELECT dataset_table_field.id AS 'source_field_id',dataset_table_field.de_type AS 'source_field_type', dataset_table_field.NAME AS 'source_field_name', panel_link_jump_info.id,
panel_link_jump_info.link_jump_id, panel_link_jump_info.link_jump_id,
panel_link_jump_info.link_type, panel_link_jump_info.link_type,
panel_link_jump_info.jump_type, panel_link_jump_info.jump_type,

View File

@ -142,6 +142,7 @@
> >
<el-option <el-option
v-for="item in currentLinkPanelViewArray" v-for="item in currentLinkPanelViewArray"
v-show="checkShow(item)"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
@ -579,6 +580,10 @@ export default {
}) })
}) })
}, },
checkShow(item) {
const result = !(this.linkJumpInfo && this.linkJumpInfo.sourceFieldType !== 1 && item.componentType && item.componentType.indexOf('time') > -1)
return result
},
handleExceed(file) { handleExceed(file) {
}, },
cancel() { cancel() {
@ -610,6 +615,7 @@ export default {
}, },
nodeClick(data, node) { nodeClick(data, node) {
this.linkJumpInfo = this.mapJumpInfoArray[data.sourceFieldId] this.linkJumpInfo = this.mapJumpInfoArray[data.sourceFieldId]
console.log('nodeClick=' + JSON.stringify(this.linkJumpInfo))
if (!this.linkJumpInfo.linkType) { if (!this.linkJumpInfo.linkType) {
this.linkJumpInfo.linkType = 'inner' this.linkJumpInfo.linkType = 'inner'
} }
@ -644,6 +650,7 @@ export default {
if (componentItem.type === 'custom' && this.widgetSubjectsFilter.includes(componentItem.serviceName)) { if (componentItem.type === 'custom' && this.widgetSubjectsFilter.includes(componentItem.serviceName)) {
this.currentLinkPanelViewArray.push({ this.currentLinkPanelViewArray.push({
id: componentItem.id, id: componentItem.id,
componentType: componentItem.serviceName,
type: 'filter', type: 'filter',
name: componentItem.options.attrs.title ? componentItem.options.attrs.title : this.widgetSubjectsTrans[componentItem.serviceName] name: componentItem.options.attrs.title ? componentItem.options.attrs.title : this.widgetSubjectsTrans[componentItem.serviceName]
}) })