提交 7b478bea authored 作者: taojinlong's avatar taojinlong

feat: 数据集列权限

...@@ -38,6 +38,7 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数 ...@@ -38,6 +38,7 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数
- MongoDB - MongoDB
- Amazon Redshift - Amazon Redshift
- Hive - Hive
- DB2
> 更多数据源支持持续增加中... > 更多数据源支持持续增加中...
......
...@@ -11,3 +11,6 @@ CREATE TABLE `dataset_column_permissions` ( ...@@ -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 `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); 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;
...@@ -118,9 +118,10 @@ export default { ...@@ -118,9 +118,10 @@ export default {
}, },
data() { data() {
return { return {
filterInit: false, // 标记是否已经通过watch.filters 进行初始化,如果filterInit=true 则create放弃数据初始化防止数据覆盖
refId: null, refId: null,
chart: BASE_CHART_STRING, chart: BASE_CHART_STRING,
requestStatus: 'waiting', requestStatus: 'success',
message: null, message: null,
drillClickDimensionList: [], drillClickDimensionList: [],
drillFilters: [], drillFilters: [],
...@@ -242,7 +243,10 @@ export default { ...@@ -242,7 +243,10 @@ export default {
watch: { watch: {
'filters': function(val1, val2) { '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: { linkageFilters: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
...@@ -313,8 +317,8 @@ export default { ...@@ -313,8 +317,8 @@ export default {
created() { created() {
this.refId = uuid.v1 this.refId = uuid.v1
if (this.element && this.element.propValue && this.element.propValue.viewId) { 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)) // 如果watch.filters 已经进行数据初始化时候,此处放弃数据初始化
if (!hasFilter || this.filters.length > 0) { this.getData(this.element.propValue.viewId, false) } !this.filterInit && this.getData(this.element.propValue.viewId, false)
} }
}, },
methods: { methods: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论