Merge branch 'main' of github.com:dataease/dataease into main

This commit is contained in:
taojinlong 2021-05-19 15:14:08 +08:00
commit 492dd99188
16 changed files with 38 additions and 34 deletions

View File

@ -20,7 +20,7 @@
and chart_group.id = #{id,jdbcType=VARCHAR}
</if>
<if test="name != null and name != ''">
and chart_group.`name` = CONCAT('%', #{name},'%')
and chart_group.`name` like CONCAT('%', #{name},'%')
</if>
<if test="pid != null">
and chart_group.pid = #{pid,jdbcType=VARCHAR}

View File

@ -20,7 +20,7 @@
and dataset_group.id = #{id,jdbcType=VARCHAR}
</if>
<if test="name != null and name != ''">
and dataset_group.`name` = CONCAT('%', #{name},'%')
and dataset_group.`name` like CONCAT('%', #{name},'%')
</if>
<if test="pid != null">
and dataset_group.pid = #{pid,jdbcType=VARCHAR}

View File

@ -19,7 +19,7 @@
<where>
model_type = #{modelType}
<if test="createBy != null">
and ( v_auth_model.type ='spine' OR ( v_auth_model.create_by = #{createBy} AND v_auth_model.type = 'leaf'))
and FIND_IN_SET(v_auth_model.id,GET_V_AUTH_MODEL_WITH_PARENT ( (select GROUP_CONCAT(id) from v_auth_model where model_type = #{modelType} and create_by =#{createBy}) ,#{modelType}))
</if>
<if test="pid !=null">
and v_auth_model.pid = #{pid}
@ -54,7 +54,7 @@
<where>
model_type = #{modelType}
<if test="createBy != null">
and ( v_auth_model.type ='spine' OR ( v_auth_model.create_by = #{createBy} AND v_auth_model.type = 'leaf'))
and FIND_IN_SET(v_auth_model.id,GET_V_AUTH_MODEL_WITH_PARENT ( (select GROUP_CONCAT(id) from v_auth_model where model_type = #{modelType} and create_by =#{createBy}) ,#{modelType}))
</if>
</where>
) authTemp
@ -64,7 +64,7 @@
auth.id = authCount.pid
<where>
<if test="createBy != null">
(chartcount.children_count>0 or chart.create_by = #{createBy})
(authCount.children_count>0 or auth.create_by = #{createBy})
</if>
</where>

View File

@ -51,7 +51,7 @@ public class DatasourceService {
datasource.setId(UUID.randomUUID().toString());
datasource.setUpdateTime(currentTimeMillis);
datasource.setCreateTime(currentTimeMillis);
datasource.setCreateBy(String.valueOf(AuthUtils.getUser().getUserId()));
datasource.setCreateBy(String.valueOf(AuthUtils.getUser().getUsername()));
datasourceMapper.insertSelective(datasource);
return datasource;
}

View File

@ -46,8 +46,9 @@ public class ChartGroupService {
}
public void delete(String id) {
ChartGroup cg = chartGroupMapper.selectByPrimaryKey(id);
ChartGroupRequest ChartGroup = new ChartGroupRequest();
ChartGroup.setId(id);
BeanUtils.copyBean(ChartGroup, cg);
List<ChartGroupDTO> tree = tree(ChartGroup);
List<String> ids = new ArrayList<>();
getAllId(tree, ids);
@ -70,7 +71,7 @@ public class ChartGroupService {
public List<ChartGroupDTO> tree(ChartGroupRequest chartGroup) {
chartGroup.setUserId(String.valueOf(AuthUtils.getUser().getUserId()));
if(chartGroup.getLevel() == null){
if (chartGroup.getLevel() == null) {
chartGroup.setLevel(0);
}
List<ChartGroupDTO> treeInfo = extChartGroupMapper.search(chartGroup);

View File

@ -51,9 +51,10 @@ public class DataSetGroupService {
return dataSetGroupDTO;
}
public void delete(String id) throws Exception{
public void delete(String id) throws Exception {
DatasetGroup dg = datasetGroupMapper.selectByPrimaryKey(id);
DataSetGroupRequest datasetGroup = new DataSetGroupRequest();
datasetGroup.setId(id);
BeanUtils.copyBean(datasetGroup, dg);
List<DataSetGroupDTO> tree = tree(datasetGroup);
List<String> ids = new ArrayList<>();
getAllId(tree, ids);
@ -68,7 +69,7 @@ public class DataSetGroupService {
return datasetGroupMapper.selectByPrimaryKey(id);
}
public void deleteTableAndField(List<String> sceneIds) throws Exception{
public void deleteTableAndField(List<String> sceneIds) throws Exception {
for (String sceneId : sceneIds) {
DataSetTableRequest dataSetTableRequest = new DataSetTableRequest();
dataSetTableRequest.setSceneId(sceneId);
@ -81,7 +82,7 @@ public class DataSetGroupService {
public List<DataSetGroupDTO> tree(DataSetGroupRequest datasetGroup) {
datasetGroup.setUserId(String.valueOf(AuthUtils.getUser().getUserId()));
if(datasetGroup.getLevel() == null){
if (datasetGroup.getLevel() == null) {
datasetGroup.setLevel(0);
}
List<DataSetGroupDTO> treeInfo = extDataSetGroupMapper.search(datasetGroup);

View File

@ -36,6 +36,7 @@ CREATE TABLE IF NOT EXISTS `user_role` (
)ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
DROP TABLE IF EXISTS `datasource`;
CREATE TABLE `datasource` (
`id` varchar(50) NOT NULL DEFAULT '' COMMENT 'ID',
`name` varchar(50) NOT NULL COMMENT '名称',
@ -467,4 +468,4 @@ CREATE TABLE `my_plugin` (
`bean_name` varchar(40) DEFAULT NULL COMMENT 'bean名称',
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
PRIMARY KEY (`plugin_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,14 +1,14 @@
<template>
<div class="top-nav" :style="{'background-color': theme}">
<div class="top-nav" :style="{'background-color': '#f1f3f8'}">
<div class="log">
<img v-if="!logoUrl" src="@/assets/DataEase-white.png" width="160" alt="" style="padding-top: 8px;">
<img v-if="!logoUrl" src="@/assets/DataEase-color.png" width="160" alt="" style="padding-top: 8px;">
<img v-else :src="logoUrl" width="160" alt="" style="padding-top: 8px;">
</div>
<el-menu
:active-text-color="variables.topMenuActiveText"
:default-active="activeMenu"
mode="horizontal"
:style="{'background-color': theme}"
:style="{'background-color': '#f1f3f8'}"
@select="handleSelect"
>
<div v-for="item in permission_routes" :key="item.path" class="nav-item">
@ -229,7 +229,7 @@ export default {
<style lang="scss" scoped>
.el-dropdown-link {
cursor: pointer;
color: #ffffff;
color: #1e212a;
}
.el-icon-arrow-down {
font-size: 12px;
@ -240,7 +240,7 @@ export default {
padding: 10px 8px;
height: 100%;
font-size: 16px;
color: rgba(255,255,255,.87);
color: #1e212a;
vertical-align: text-bottom;
margin-right: 10px;
}

View File

@ -191,7 +191,7 @@ div:focus {
.ds-icon-scene{
width: 14px;
height: 14px;
color: #faaa39;
color: #0a7be0;
}
.ds-icon-db{
width: 14px;

View File

@ -8,6 +8,7 @@
left: 0;
z-index: 1001;
overflow: hidden;
border-bottom: 1px solid #DCDFE6;
.log {
padding: 0 16px;
@ -29,7 +30,7 @@
display: inline-block;
.el-menu-item {
// color: rgb(191, 203, 217);
color: rgba(255,255,255,0.87);
color: $menuText;
&:hover {
background-color: $subMenuHover !important;
color: $subMenuActiveText !important;
@ -65,7 +66,7 @@
height: 100%;
font-size: 18px;
// color: #5a5e66;
color: $menuText;
color: #606266;
vertical-align: text-bottom;
&.hover-effect {

View File

@ -4,7 +4,7 @@
**/
/* theme color */
$--color-primary: #f1a826;
$--color-primary: #0a7be0;
$--color-success: #13ce66;
$--color-warning: #ffba00;
$--color-danger: #ff4949;
@ -26,8 +26,8 @@ $--font-path: "~element-ui/lib/theme-chalk/fonts";
@import "~fit2cloud-ui/src/styles/common/variables";
// sidebar
$menuText:rgba(255,255,255,0.87);
$menuActiveText:#f18126;
$menuText:#1e212a;
$menuActiveText:#0a7be0;
$topMenuActiveText:#f4f4f5;
$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951
@ -38,7 +38,7 @@ $menuHover: rgba(158, 158, 158, 0.2);
$subMenuBg:#1f2d3d;
// $subMenuHover:#001528;
$subMenuHover:#f18126;
$subMenuHover:#0a7be0;
$sideBarWidth: 210px;
$topBarHeight: 56px;

View File

@ -825,9 +825,9 @@ export default {
}
.item:hover {
color: #f1a826;
background: #fffcef;
border-color: #f3c13c;
color: #1890ff;
background: #e8f4ff;
border-color: #a3d3ff;
cursor: pointer;
}

View File

@ -118,6 +118,7 @@ export default {
},
created() {
this.targetActiveName = this.targetInfoArray[0].authType
this.sourceActiveName = this.sourceInfoArray[0].authType
},
methods: {

View File

@ -181,7 +181,7 @@ export default {
})
}
} else {
resolve([])
resolve(node.data.children)
}
},
filterNode(index) {
@ -197,7 +197,6 @@ export default {
//
this.highlights(res.data)
this.treeData = this.buildTree(res.data)
// searchStatus
this.$nextTick(() => (this.searchStatus = false))
})

View File

@ -5,10 +5,10 @@
<span slot="label">{{$t('auth.authConfig')}}</span>
<auth-config />
</el-tab-pane>
<el-tab-pane name="authQuickConfig">
<span slot="label">{{$t('auth.authQuickConfig')}}</span>
<auth-quick-config />
</el-tab-pane>
<!-- <el-tab-pane name="authQuickConfig">-->
<!-- <span slot="label">{{$t('auth.authQuickConfig')}}</span>-->
<!-- <auth-quick-config />-->
<!-- </el-tab-pane>-->
</el-tabs>
</de-main-container>
</template>