feat: 数据集列权限

This commit is contained in:
taojinlong 2022-01-19 11:54:00 +08:00
commit 7b478beae3
3 changed files with 12 additions and 4 deletions

View File

@ -38,6 +38,7 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数
- MongoDB
- Amazon Redshift
- Hive
- DB2
> 更多数据源支持持续增加中...

View File

@ -11,3 +11,6 @@ CREATE TABLE `dataset_column_permissions` (
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (61, 0, 0, 1, '首页', 'wizard', 'wizard/index', 0, '', '/wizard', b'1', b'0', b'0', NULL, NULL, NULL, NULL, 1614915491036);
INSERT INTO `system_parameter` (`param_key`, `param_value`, `type`, `sort`) VALUES ('ui.openHomePage', 'true', 'boolean', 13);
UPDATE `dataset_table_function` SET `desc` = '如果expr等于某个vn则返回对应位置THEN后面的结果如果与所有值都不相等则返回ELSE后面的rn' WHERE `id` = 47;
UPDATE `dataset_table_function` SET `desc` = '如果expr等于某个vn则返回对应位置THEN后面的结果如果与所有值都不相等则返回ELSE后面的rn' WHERE `id` = 96;

View File

@ -118,9 +118,10 @@ export default {
},
data() {
return {
filterInit: false, // watch.filters filterInit=true create
refId: null,
chart: BASE_CHART_STRING,
requestStatus: 'waiting',
requestStatus: 'success',
message: null,
drillClickDimensionList: [],
drillFilters: [],
@ -242,7 +243,10 @@ export default {
watch: {
'filters': function(val1, val2) {
isChange(val1, val2) && this.getData(this.element.propValue.viewId)
if (isChange(val1, val2)) {
this.filterInit = true
this.getData(this.element.propValue.viewId)
}
},
linkageFilters: {
handler(newVal, oldVal) {
@ -313,8 +317,8 @@ export default {
created() {
this.refId = uuid.v1
if (this.element && this.element.propValue && this.element.propValue.viewId) {
const hasFilter = this.componentData.filter(item => item.type === 'custom').some(item => item.options.value && !(item.options.value instanceof Object) || (item.options.attrs && item.options.attrs.default && item.options.attrs.default.isDynamic))
if (!hasFilter || this.filters.length > 0) { this.getData(this.element.propValue.viewId, false) }
// watch.filters
!this.filterInit && this.getData(this.element.propValue.viewId, false)
}
},
methods: {