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

This commit is contained in:
taojinlong 2021-05-19 11:56:09 +08:00
commit 4399978965
18 changed files with 63 additions and 55 deletions

View File

@ -4,6 +4,7 @@ package io.dataease.controller.sys;
import io.dataease.base.domain.SysMenu;
import io.dataease.commons.utils.BeanUtils;
import io.dataease.controller.handler.annotation.I18n;
import io.dataease.controller.sys.request.MenuCreateRequest;
import io.dataease.controller.sys.request.MenuDeleteRequest;
import io.dataease.controller.sys.response.MenuNodeResponse;
@ -28,6 +29,7 @@ public class SysMenuController {
private MenuService menuService;
@ApiOperation("查询跟节点菜单")
@I18n
@PostMapping("/childNodes/{pid}")
public List<MenuNodeResponse> childNodes(@PathVariable("pid") Long pid){
List<SysMenu> nodes = menuService.nodesByPid(pid);

View File

@ -112,7 +112,7 @@ public class DatasourceService {
dbTableDTO.setDatasetPath(null);
for (DatasetTable datasetTable : datasetTables) {
DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class);
if (StringUtils.equals(name, dataTableInfoDTO.getTable()) && StringUtils.equals(datasetTable.getCreateBy(), AuthUtils.getUser().getUsername())) {
if (StringUtils.equals(name, dataTableInfoDTO.getTable())) {
dbTableDTO.setEnableCheck(false);
List<DatasetGroup> parents = dataSetGroupService.getParents(datasetTable.getSceneId());

View File

@ -10,14 +10,14 @@ INSERT INTO `sys_dept` VALUES (25, 20, 0, '售前组', 1, NULL, NULL, 1615791706
COMMIT;
BEGIN;
INSERT INTO `sys_menu` VALUES (1, 0, 3, 0, '系统管理', '系统管理', 'Layout', 6, 'system', '/system', NULL, b'0', b'0', 'dir:sys', NULL, NULL, NULL, 1614916695777);
INSERT INTO `sys_menu` VALUES (2, 1, 4, 1, '用户管理', '用户管理', 'system/user/index', 1, 'peoples', 'user', NULL, b'0', b'0', 'user:read', NULL, NULL, NULL, 1620281952752);
INSERT INTO `sys_menu` VALUES (3, 1, 3, 1, '菜单管理', '菜单管理', 'system/menu/index', 2, 'menu', 'menu', NULL, b'0', b'0', 'menu:read', NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (4, 1, 3, 1, '组织管理', '组织管理', 'system/dept/index', 3, 'dept', 'dept', NULL, b'0', b'0', 'dept:read', NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (5, 1, 3, 1, '角色管理', '角色管理', 'system/role/index', 4, 'role', 'role', b'0', b'0', b'0', 'role:read', NULL, NULL, 1614683852133, 1614683852133);
INSERT INTO `sys_menu` VALUES (6, 1, 0, 1, '参数管理', '参数管理', 'system/systemParamSettings/index', 5, 'sys-tools', 'systemParamSettings', NULL, b'0', b'0', 'sysparam:read', NULL, NULL, NULL, 1615790294169);
INSERT INTO `sys_menu` VALUES (8, 0, 0, 1, '数据集', '数据集', 'dataset/index', 3, '', '/dataset', NULL, b'0', b'0', 'data:read', NULL, NULL, NULL, 1614916684821);
INSERT INTO `sys_menu` VALUES (10, 0, 0, 1, '视图', '视图', 'chart/index', 2, '', '/chart', NULL, b'0', b'0', 'chart:read', NULL, NULL, NULL, 1614915491036);
INSERT INTO `sys_menu` VALUES (1, 0, 3, 0, '系统管理', 'system', 'Layout', 6, 'system', '/system', NULL, b'0', b'0', 'dir:sys', NULL, NULL, NULL, 1614916695777);
INSERT INTO `sys_menu` VALUES (2, 1, 4, 1, '用户管理', 'system-user', 'system/user/index', 1, 'peoples', 'user', NULL, b'0', b'0', 'user:read', NULL, NULL, NULL, 1620281952752);
INSERT INTO `sys_menu` VALUES (3, 1, 3, 1, '菜单管理', 'system-menu', 'system/menu/index', 2, 'menu', 'menu', NULL, b'0', b'0', 'menu:read', NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (4, 1, 3, 1, '组织管理', 'system-dept', 'system/dept/index', 3, 'dept', 'dept', NULL, b'0', b'0', 'dept:read', NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (5, 1, 3, 1, '角色管理', 'system-role', 'system/role/index', 4, 'role', 'role', b'0', b'0', b'0', 'role:read', NULL, NULL, 1614683852133, 1614683852133);
INSERT INTO `sys_menu` VALUES (6, 1, 0, 1, '参数管理', 'system-param', 'system/systemParamSettings/index', 5, 'sys-tools', 'systemParamSettings', NULL, b'0', b'0', 'sysparam:read', NULL, NULL, NULL, 1615790294169);
INSERT INTO `sys_menu` VALUES (8, 0, 0, 1, '数据集', 'dataset', 'dataset/index', 3, '', '/dataset', NULL, b'0', b'0', 'data:read', NULL, NULL, NULL, 1614916684821);
INSERT INTO `sys_menu` VALUES (10, 0, 0, 1, '视图', 'view', 'chart/index', 2, '', '/chart', NULL, b'0', b'0', 'chart:read', NULL, NULL, NULL, 1614915491036);
INSERT INTO `sys_menu` VALUES (12, 3, 0, 2, '创建菜单', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'menu:add', NULL, NULL, 1614924617327, 1614924617327);
INSERT INTO `sys_menu` VALUES (13, 3, 0, 2, '删除菜单', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'menu:del', NULL, NULL, 1614924667808, 1614924667808);
INSERT INTO `sys_menu` VALUES (14, 3, 0, 2, '编辑菜单', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'menu:edit', NULL, NULL, 1614930734224, 1614936429773);
@ -35,18 +35,19 @@ INSERT INTO `sys_menu` VALUES (25, 34, 0, 2, '删除连接', NULL, NULL, 999, NU
INSERT INTO `sys_menu` VALUES (26, 34, 0, 2, '编辑连接', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'datasource:edit', NULL, NULL, 1614931234105, 1614931234105);
INSERT INTO `sys_menu` VALUES (27, 34, 0, 2, '校验连接', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'datasource:validate', NULL, NULL, 1614931268578, 1614931268578);
INSERT INTO `sys_menu` VALUES (28, 2, 0, 2, '修改密码', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'user:editPwd', NULL, NULL, 1615275128262, 1615275128262);
INSERT INTO `sys_menu` VALUES (30, 0, 0, 1, '仪表盘', '仪表盘', 'panel/index', 1, NULL, '/panel', b'0', b'0', b'0', 'panel:read', NULL, NULL, NULL, 1619081449067);
INSERT INTO `sys_menu` VALUES (34, 0, 4, 1, '数据源', '数据源', 'system/datasource/index', 4, NULL, '/datasource', b'0', b'0', b'0', 'datasource:read', NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (35, 1, 0, 1, '用户表单', '用户表单', 'system/user/form', 10, '', 'user-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (36, 1, 0, 1, '菜单表单', '菜单表单', 'system/menu/form', 11, '', 'menu-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (37, 1, 0, 1, '组织表单', '组织表单', 'system/dept/form', 12, '', 'dept-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (38, 1, 0, 1, '角色表单', '角色表单', 'system/role/form', 13, '', 'role-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (39, 0, 0, 1, '数据源表单', '数据源表单', 'system/datasource/form', 5, NULL, '/ds-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (40, 1, 0, 1, '模板管理', '模板管理', 'panel/template/index', 13, 'dashboard', 'panel/template/index', NULL, b'0', b'0', 'sysparam:read', NULL, NULL, NULL, 1620444227389);
INSERT INTO `sys_menu` VALUES (41, 1, 0, 1, '权限管理', '权限管理', 'system/authority/index', 14, 'password', 'system/authority/index', b'0', b'0', b'0', 'sysparam:read', NULL, NULL, NULL, 1620447312657);
INSERT INTO `sys_menu` VALUES (50, 0, 0, 1, '个人信息', '个人信息', 'system/user/privateForm', 999, NULL, '/person-info', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (51, 0, 0, 1, '重置密码', '重置密码', 'system/user/personPwd', 999, NULL, '/person-pwd', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (52, 1, 0, 1, '关于', '关于', 'system/about/index', 16, 'system', 'about', b'0', b'0', b'0', NULL, NULL, NULL, NULL, 1620897406691);
INSERT INTO `sys_menu` VALUES (30, 0, 0, 1, '仪表盘', 'panel', 'panel/index', 1, NULL, '/panel', b'0', b'0', b'0', 'panel:read', NULL, NULL, NULL, 1619081449067);
INSERT INTO `sys_menu` VALUES (34, 0, 4, 1, '数据源', 'datasource', 'system/datasource/index', 4, NULL, '/datasource', b'0', b'0', b'0', 'datasource:read', NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (35, 1, 0, 1, '用户表单', 'system-user-form', 'system/user/form', 10, '', 'user-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (36, 1, 0, 1, '菜单表单', 'system-menu-form', 'system/menu/form', 11, '', 'menu-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (37, 1, 0, 1, '组织表单', 'system-dept-form', 'system/dept/form', 12, '', 'dept-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (38, 1, 0, 1, '角色表单', 'system-role-form', 'system/role/form', 13, '', 'role-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (39, 0, 0, 1, '数据源表单', 'datasource-form', 'system/datasource/form', 5, NULL, '/ds-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (40, 1, 0, 1, '模板管理', 'system-template', 'panel/template/index', 13, 'dashboard', 'panel/template/index', NULL, b'0', b'0', 'sysparam:read', NULL, NULL, NULL, 1620444227389);
INSERT INTO `sys_menu` VALUES (41, 1, 0, 1, '权限管理', 'system-auth', 'system/authority/index', 14, 'password', 'system/authority/index', b'0', b'0', b'0', 'sysparam:read', NULL, NULL, NULL, 1620447312657);
INSERT INTO `sys_menu` VALUES (42, 1, 0, 1, '插件管理', 'system-plugin', 'system/plugin/index', 15, 'sys-tools', '/plugin', b'0', b'0', b'0', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (50, 0, 0, 1, '个人信息', 'person-info', 'system/user/privateForm', 999, NULL, '/person-info', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (51, 0, 0, 1, '重置密码', 'person-pwd-reset', 'system/user/personPwd', 999, NULL, '/person-pwd', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (52, 0, 0, 1, '关于', 'about', 'system/about/index', 16, 'system', '/about', b'0', b'0', b'1', NULL, NULL, NULL, NULL, 1620897406691);
COMMIT;
BEGIN;

View File

@ -45,7 +45,7 @@ export default {
return false
}
// return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
return name.trim().toLocaleLowerCase() === '仪表板'.toLocaleLowerCase()
return name.trim().toLocaleLowerCase() === 'panel'.toLocaleLowerCase()
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561

View File

@ -49,10 +49,10 @@
<router-link to="/person-pwd/index">
<el-dropdown-item>{{ $t('user.reset_password') }}</el-dropdown-item>
</router-link>
<a href="https://panjiachen.github.io/vue-element-admin-site/#/" target="_blank">
<a href="/swagger-ui.html" target="_blank">
<el-dropdown-item>{{ $t('commons.help_documentation') }} </el-dropdown-item>
</a>
<router-link to="/system/about">
<router-link to="/about/index">
<el-dropdown-item>{{ $t('commons.about_us') }}</el-dropdown-item>
</router-link>
<el-dropdown-item divided @click.native="logout">

View File

@ -152,7 +152,7 @@ const hasPermission = (router, user_permissions) => {
}
return true
}
const xpackMenuNames = ['参数管理', '插件管理']
const xpackMenuNames = ['system-param', 'system-plugin']
const filterLic = (router) => {
if (xpackMenuNames.some(name => name === router.name) && !store.getters.validate) {
return false

View File

@ -30,10 +30,10 @@
<el-row>
<span class="header-title">
{{ $t('panel.panel') }}
<!-- <el-button style="float: right;padding-right: 7px;" type="text" @click="showEditPanel(newFolder)" />-->
<el-button style="float: right;" type="primary" size="mini" @click="showEditPanel(newFolder)">
{{ $t('panel.groupAdd') }}
</el-button>
<el-button style="float: right;padding-right: 7px;" icon="el-icon-plus" type="text" @click="showEditPanel(newFolder)" />
<!-- <el-button style="float: right;" type="primary" size="mini" @click="showEditPanel(newFolder)">-->
<!-- {{ $t('panel.groupAdd') }}-->
<!-- </el-button>-->
</span>
</el-row>
<el-col class="custom-tree-container">

View File

@ -44,7 +44,7 @@
</div>
<div class="md-padding" />
<div layout="row" layout-align="space-between center" class="lic_rooter">
<div v-if="user.isAdmin" layout="row" layout-align="space-between center" class="lic_rooter">
<el-upload
action=""
:multiple="false"
@ -71,6 +71,7 @@
import LayoutContent from '@/components/business/LayoutContent'
import { validate, buildVersion, updateInfo } from '@/api/system/about'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
export default {
components: { LayoutContent },
@ -84,7 +85,11 @@ export default {
headers: { Authorization: getToken() }
}
},
computed: {
...mapGetters([
'user'
])
},
created() {
this.initVersion()
this.getLicenseInfo()

View File

@ -1,5 +1,5 @@
<template>
<layout-content :header="formType=='add' ? $t('datasource.create') : $t('datasource.modify')" back-name="数据源">
<layout-content :header="formType=='add' ? $t('datasource.create') : $t('datasource.modify')" back-name="datasource">
<el-form ref="dsForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="form.name" autocomplete="off" />
@ -127,7 +127,7 @@ export default {
}
},
backToList() {
this.$router.push({ name: '数据源' })
this.$router.push({ name: 'datasource' })
}
}
}

View File

@ -165,7 +165,7 @@ export default {
// this.dialogVisible = true
// },
create() {
this.$router.push({ name: '数据源表单' })
this.$router.push({ name: 'datasource-form' })
},
// edit(row) {
@ -175,7 +175,7 @@ export default {
// this.form.configuration = JSON.parse(this.form.configuration)
// },
edit(row) {
this.$router.push({ name: '数据源表单', params: row })
this.$router.push({ name: 'datasource-form', params: row })
},
_handleDelete(datasource) {

View File

@ -1,5 +1,5 @@
<template>
<layout-content :header="formType=='add' ? $t('organization.create') : $t('organization.modify')" back-name="组织管理">
<layout-content :header="formType=='add' ? $t('organization.create') : $t('organization.modify')" back-name="system-dept">
<el-form ref="deptForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('organization.name')" prop="name">
<el-input v-model="form.name" />
@ -157,7 +157,7 @@ export default {
})
},
backToList() {
this.$router.push({ name: '组织管理' })
this.$router.push({ name: 'system-dept' })
}
}
}

View File

@ -7,7 +7,7 @@
>
<template #toolbar>
<el-button v-permission="['dept:add']" icon="el-icon-circle-plus-outline" @click="create">{{ $t('organization.create') }}</el-button>
</template>
</template>
<el-table
ref="table"
:data="tableData"
@ -184,10 +184,10 @@ export default {
// this.treeByRow(row)
// },
create() {
this.$router.push({ name: '组织表单' })
this.$router.push({ name: 'system-dept-form' })
},
edit(row) {
this.$router.push({ name: '组织表单', params: row })
this.$router.push({ name: 'system-dept-form', params: row })
},
treeByRow(row) {

View File

@ -1,5 +1,5 @@
<template>
<layout-content :header="formType=='add' ? $t('menu.create') : $t('menu.modify')" back-name="菜单管理">
<layout-content :header="formType=='add' ? $t('menu.create') : $t('menu.modify')" back-name="system-menu">
<el-form ref="menuForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item label="菜单类型" prop="type">
<el-radio-group v-model="form.type" size="mini" :disabled="formType!=='add'">
@ -167,7 +167,7 @@ export default {
})
},
backToList() {
this.$router.push({ name: '菜单管理' })
this.$router.push({ name: 'system-menu' })
}
}
}

View File

@ -201,7 +201,7 @@ export default {
// this.formType = 'add'
// },
create() {
this.$router.push({ name: '菜单表单' })
this.$router.push({ name: 'system-menu-form' })
},
search(condition) {
console.log(condition)
@ -215,7 +215,7 @@ export default {
// this.treeByRow(row)
// },
edit(row) {
this.$router.push({ name: '菜单表单', params: row })
this.$router.push({ name: 'system-menu-form', params: row })
},
treeByRow(row) {

View File

@ -1,10 +1,10 @@
<template>
<layout-content :header="formType=='add' ? $t('role.add') : $t('role.modify')" back-name="角色管理">
<layout-content :header="formType=='add' ? $t('role.add') : $t('role.modify')" back-name="system-role">
<el-form ref="roleForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="form.name" />
</el-form-item>
<el-form-item :label="$t('commons.description')" prop="description">
<el-form-item :label="$t('commons.description')" prop="description">
<el-input v-model="form.description" type="textarea" />
</el-form-item>
<el-form-item>
@ -97,7 +97,7 @@ export default {
}
},
backToList() {
this.$router.push({ name: '角色管理' })
this.$router.push({ name: 'system-role' })
}
}
}

View File

@ -148,7 +148,7 @@ export default {
console.log(tab, event)
},
create() {
this.$router.push({ name: '角色表单' })
this.$router.push({ name: 'system-role-form' })
},
search(condition) {
const temp = formatCondition(condition)
@ -160,7 +160,7 @@ export default {
})
},
edit(row) {
this.$router.push({ name: '角色表单', params: row })
this.$router.push({ name: 'system-role-form', params: row })
},
saveRole(roleForm) {
@ -250,9 +250,9 @@ export default {
this.$refs.menu.setCheckedKeys(this.menuIds)
},
handleDelete(row) {
this.$confirm( this.$t('commons.confirm_delete') + ": " + row.name + '', this.$t('role.tips'), {
this.$confirm(this.$t('commons.confirm_delete') + ': ' + row.name + '', this.$t('role.tips'), {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
}).then(() => {
delRole(row.roleId).then(res => {

View File

@ -1,5 +1,5 @@
<template>
<layout-content :header="formType=='add' ? $t('user.create') : $t('user.modify')" back-name="用户管理">
<layout-content :header="formType=='add' ? $t('user.create') : $t('user.modify')" back-name="system-user">
<el-form ref="createUserForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form-item :label="$t('commons.name')" prop="username">
<el-input v-model="form.username" />
@ -258,7 +258,7 @@ export default {
})
},
backToList() {
this.$router.push({ name: '用户管理' })
this.$router.push({ name: 'system-user' })
},
filterData(instanceId) {
const results = this.depts.map(node => {

View File

@ -299,7 +299,7 @@ export default {
})
},
create() {
this.$router.push({ name: '用户表单' })
this.$router.push({ name: 'system-user-form' })
},
// create() {
// this.depts = null
@ -308,7 +308,7 @@ export default {
// this.dialogVisible = true
// },
edit(row) {
this.$router.push({ name: '用户表单', params: row })
this.$router.push({ name: 'system-user-form', params: row })
},
// edit(row) {
// this.depts = null