Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
a58c485c6a
@ -1,13 +1,12 @@
|
||||
package io.dataease.base.mapper.ext;
|
||||
|
||||
import io.dataease.base.mapper.ext.query.GridExample;
|
||||
import io.dataease.dto.panel.po.PanelViewPo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExtPanelViewMapper {
|
||||
|
||||
List<PanelViewPo> groups(GridExample example);
|
||||
List<PanelViewPo> groups(String userId);
|
||||
|
||||
List<PanelViewPo> views(GridExample example);
|
||||
List<PanelViewPo> views(String userId);
|
||||
}
|
||||
|
||||
@ -11,32 +11,23 @@
|
||||
|
||||
|
||||
|
||||
<select id="groups" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="treeNodeMap">
|
||||
<select id="groups" resultMap="treeNodeMap">
|
||||
select id, pid, name, `type`
|
||||
from chart_group
|
||||
<if test="_parameter != null">
|
||||
<include refid="io.dataease.base.mapper.ext.query.GridSql.gridCondition" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="orderByClause == null">
|
||||
order by create_time desc
|
||||
</if>
|
||||
from (select GET_V_AUTH_MODEL_ID_P_USE (#{userId}, 'chart') cids) t,chart_group
|
||||
<where>
|
||||
FIND_IN_SET(chart_group.id,cids)
|
||||
</where>
|
||||
order by create_time desc
|
||||
|
||||
</select>
|
||||
|
||||
<select id="views" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="treeNodeMap">
|
||||
select id, scene_id as pid ,title as name, `type`
|
||||
from chart_view
|
||||
<if test="_parameter != null">
|
||||
<include refid="io.dataease.base.mapper.ext.query.GridSql.gridCondition" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="orderByClause == null">
|
||||
order by create_time desc
|
||||
</if>
|
||||
<select id="views" resultMap="treeNodeMap">
|
||||
select id, scene_id as pid , name, `type`
|
||||
from (select GET_V_AUTH_MODEL_ID_P_USE (#{userId}, 'chart') cids) t, chart_view
|
||||
<where>
|
||||
FIND_IN_SET(chart_view.id,cids)
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@ -18,9 +18,13 @@ import java.util.List;
|
||||
public interface ViewApi {
|
||||
|
||||
|
||||
@ApiOperation("视图树")
|
||||
// @ApiOperation("视图树")
|
||||
// @PostMapping("/tree")
|
||||
// List<PanelViewDto> tree(BaseGridRequest request);
|
||||
|
||||
@ApiOperation("授权的视图树")
|
||||
@PostMapping("/tree")
|
||||
List<PanelViewDto> tree(BaseGridRequest request);
|
||||
List<PanelViewDto> treeWithAuth();
|
||||
|
||||
|
||||
@ApiOperation("根据仪表板Id查询视图")
|
||||
|
||||
@ -34,16 +34,9 @@ public class ViewServer implements ViewApi {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PanelViewDto> tree(@RequestBody BaseGridRequest request) {
|
||||
List<ConditionEntity> conditions = new ArrayList<>();
|
||||
ConditionEntity condition = new ConditionEntity();
|
||||
condition.setField("create_by");
|
||||
condition.setOperator("eq");
|
||||
condition.setValue(AuthUtils.getUser().getUsername());
|
||||
conditions.add(condition);
|
||||
request.setConditions(conditions);
|
||||
List<PanelViewPo> groups = panelViewService.groups(request);
|
||||
List<PanelViewPo> views = panelViewService.views(request);
|
||||
public List<PanelViewDto> treeWithAuth() {
|
||||
List<PanelViewPo> groups = panelViewService.groups();
|
||||
List<PanelViewPo> views = panelViewService.views();
|
||||
List<PanelViewDto> panelViewDtos = panelViewService.buildTree(groups, views);
|
||||
return panelViewDtos;
|
||||
}
|
||||
|
||||
@ -90,11 +90,15 @@ div:focus {
|
||||
width: 50% !important;
|
||||
|
||||
.el-dialog__header{
|
||||
background-color: #f4f4f5;
|
||||
// background-color: #f4f4f5;
|
||||
padding: 10px 20px !important;
|
||||
|
||||
.el-dialog__headerbtn {
|
||||
top: 15px !important;
|
||||
}
|
||||
}
|
||||
.el-dialog__body{
|
||||
padding: 1px 20px !important;
|
||||
padding: 1px 15px !important;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@
|
||||
:in-draw="false"
|
||||
/>
|
||||
</filter-dialog>
|
||||
<div style="text-align: end !important;margin: 0 15px !important;">
|
||||
<div style="text-align: end !important;margin: 0 15px 10px !important;">
|
||||
<span slot="footer">
|
||||
<el-button size="mini" @click="cancelFilter">{{ $t('commons.cancel') }}</el-button>
|
||||
<el-button :disabled="!currentFilterCom.options.attrs.fieldId" type="primary" size="mini" @click="sureFilter">{{ $t('commons.confirm') }}</el-button>
|
||||
|
||||
@ -521,7 +521,7 @@ export default {
|
||||
.ms-main-container {
|
||||
height: 100%;
|
||||
min-height: 400px;
|
||||
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.filter-field {
|
||||
@ -588,13 +588,14 @@ export default {
|
||||
}
|
||||
|
||||
.filter-content {
|
||||
height: calc(50vh - 130px);
|
||||
height: calc(50vh - 120px);
|
||||
top: 160px;
|
||||
|
||||
}
|
||||
|
||||
.filter-dialog-tabs {
|
||||
border: 1px solid #E6E6E6;
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
>>> div.el-tabs__content {
|
||||
height: calc(100% - 55px);
|
||||
@ -602,12 +603,12 @@ export default {
|
||||
}
|
||||
|
||||
.filter-common {
|
||||
margin: 10px 10px;
|
||||
margin: 10px 5px;
|
||||
|
||||
}
|
||||
|
||||
.component-header {
|
||||
margin: 20px 10px !important;
|
||||
margin: 5px 5px 15px;
|
||||
}
|
||||
|
||||
.component-result-content {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user