fix(仪表板): Tab组件选择视图时插件视图组件没有显示图标问题

This commit is contained in:
wangjiahao 2022-07-04 15:01:53 +08:00
parent cfad9319ea
commit d72f5432f2
6 changed files with 38 additions and 4 deletions

View File

@ -22,6 +22,8 @@ public class VAuthModelDTO extends VAuthModelWithBLOBs implements ITreeBase<VAut
private String innerId;
private Boolean isPlugin = false;
public String toString(){
return this.getName();
}

View File

@ -5,6 +5,7 @@
type="io.dataease.dto.authModel.VAuthModelDTO">
<result column="privileges" jdbcType="VARCHAR" property="privileges"/>
<result column="inner_id" jdbcType="VARCHAR" property="innerId"/>
<result column="is_plugin" jdbcType="VARCHAR" property="isPlugin"/>
</resultMap>
<select id="queryAuthModel" resultMap="ExtResultMap">
@ -117,7 +118,8 @@
panel_view.panel_id AS pid,
chart_view.type as 'model_inner_type',
'leaf' AS node_type,
'view' AS model_type
'view' AS model_type,
chart_view.is_plugin as 'is_plugin'
FROM
chart_view
LEFT JOIN panel_view ON panel_view.chart_view_id = chart_view.id

View File

@ -65,3 +65,33 @@ CREATE TABLE `sys_user_assist` (
`need_first_noti` bit(1) DEFAULT NULL COMMENT '是否需要首登提示',
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
CREATE
OR REPLACE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `v_history_chart_view` AS SELECT
`chart_group`.`id` AS `id`,
`chart_group`.`id` AS `inner_id`,
`chart_group`.`name` AS `NAME`,
`chart_group`.`name` AS `label`,
`chart_group`.`pid` AS `pid`,
`chart_group`.`type` AS `model_inner_type`,
'spine' AS `node_type`,
'view' AS `model_type`,
1 AS `mode`,
0 AS `is_plugin`
FROM
`chart_group` UNION ALL
SELECT DISTINCT
`chart_view`.`id` AS `id`,
`chart_view`.`id` AS `inner_id`,
`chart_view`.`name` AS `NAME`,
`chart_view`.`name` AS `label`,
`chart_view`.`scene_id` AS `pid`,
`chart_view`.`type` AS `model_inner_type`,
'leaf' AS `node_type`,
'view' AS `model_type`,
1 AS `mode`,
`chart_view`.`is_plugin` AS `is_plugin`
FROM
`chart_view`
WHERE
( `chart_view`.`chart_type` = 'public' );

View File

@ -42,7 +42,7 @@
<svg-icon icon-class="panel" class="ds-icon-scene" />
</span>
<span v-else>
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
</span>
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
</span>

View File

@ -46,7 +46,7 @@
<svg-icon icon-class="panel" class="ds-icon-scene" />
</span>
<span v-else>
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
</span>
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
</span>

View File

@ -35,7 +35,7 @@
<svg-icon icon-class="panel" class="ds-icon-scene" />
</span>
<span v-else>
<svg-icon :icon-class="data.isPlugin && data.type && data.type !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
<svg-icon :icon-class="data.isPlugin && data.modelInnerType && data.modelInnerType !== 'buddle-map' ? ('/api/pluginCommon/staticInfo/' + data.modelInnerType + '/svg') : data.modelInnerType" style="width: 14px;height: 14px" />
</span>
<span style="margin-left: 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" :title="data.name">{{ data.name }}</span>
</span>