diff --git a/frontend/src/icons/svg/ds-union.svg b/frontend/src/icons/svg/ds-union.svg new file mode 100644 index 0000000000..9e6b6b4c01 --- /dev/null +++ b/frontend/src/icons/svg/ds-union.svg @@ -0,0 +1 @@ + diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 50586e93ce..bf8473c154 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -653,9 +653,9 @@ export default { process: 'Speed of progress', add_chart: 'Add Chart', db_data: 'Database Dataset', - sql_data: 'SQL data set', - excel_data: 'Excel data set', - custom_data: 'Custom data set', + sql_data: 'SQL Dataset', + excel_data: 'Excel Dataset', + custom_data: 'Custom Dataset', pls_slc_tbl_left: 'Please select the chart from the left', add_db_table: 'Add Database Dataset', pls_slc_data_source: 'Please select data source', @@ -994,9 +994,9 @@ export default { process: 'Speed of progress', update: 'update', db_data: 'Database Dataset', - sql_data: 'SQL data set', - excel_data: 'Excel data set', - custom_data: 'Custom data set', + sql_data: 'SQL Dataset', + excel_data: 'Excel Dataset', + custom_data: 'Custom Dataset', pls_slc_tbl_left: 'Please select the chart from the left', add_db_table: 'Add Database Dataset', pls_slc_data_source: 'Please select data source', @@ -1150,7 +1150,11 @@ export default { confirm_sync_field: 'Confirm Sync', confirm_sync_field_tips: 'Sync field maybe change edit field,please confirm', sync_success: 'Success', - sync_success_1: 'Success,please sync data again' + sync_success_1: 'Success,please sync data again', + union_data: 'Union Dataset', + add_union_table: 'Add Union Dataset', + edit_union: 'Edit Union Dataset', + union: 'Union' }, datasource: { datasource: 'Data Source', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index f5ce43ba36..a48863f003 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1151,7 +1151,11 @@ export default { confirm_sync_field: '確認同步', confirm_sync_field_tips: '同步字段可能會導致已編輯字段發生變更,請確認', sync_success: '同步成功', - sync_success_1: '同步成功,請對當前數據集重新執行數據同步操作' + sync_success_1: '同步成功,請對當前數據集重新執行數據同步操作', + union_data: '關聯數據集', + add_union_table: '添加關聯數據集', + edit_union: '編輯關聯數據集', + union: '關聯' }, datasource: { datasource: '數據源', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 21789aa6d7..59e3da328c 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1154,7 +1154,11 @@ export default { confirm_sync_field: '确认同步', confirm_sync_field_tips: '同步字段可能会导致已编辑字段发生变更,请确认', sync_success: '同步成功', - sync_success_1: '同步成功,请对当前数据集重新执行数据同步操作' + sync_success_1: '同步成功,请对当前数据集重新执行数据同步操作', + union_data: '关联数据集', + add_union_table: '添加关联数据集', + edit_union: '编辑关联数据集', + union: '关联' }, datasource: { datasource: '数据源', diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 17d6c49325..5d8e507feb 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -340,6 +340,13 @@ div:focus { margin: 0 2px 0 0; } +.ds-icon-union{ + width: 14px; + height: 14px; + color: #a479e7; + margin: 0 2px 0 0; +} + .showRightPanel { .el-popper { position: fixed !important; diff --git a/frontend/src/views/dataset/add/AddUnion.vue b/frontend/src/views/dataset/add/AddUnion.vue index 210f1b916a..ac6a55328c 100644 --- a/frontend/src/views/dataset/add/AddUnion.vue +++ b/frontend/src/views/dataset/add/AddUnion.vue @@ -1,262 +1,154 @@ diff --git a/frontend/src/views/dataset/add/union/NodeItem.vue b/frontend/src/views/dataset/add/union/NodeItem.vue new file mode 100644 index 0000000000..d82eab7ae9 --- /dev/null +++ b/frontend/src/views/dataset/add/union/NodeItem.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/frontend/src/views/dataset/add/union/UnionNode.vue b/frontend/src/views/dataset/add/union/UnionNode.vue new file mode 100644 index 0000000000..62a93eff54 --- /dev/null +++ b/frontend/src/views/dataset/add/union/UnionNode.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue b/frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue index 3664bce2b2..836ab23ced 100644 --- a/frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue +++ b/frontend/src/views/dataset/common/DatasetGroupSelectorTree.vue @@ -162,16 +162,6 @@ export default { this.unionDataChange() }, 'table': function() { - // if (this.table && this.table.sceneId) { - // post('dataset/group/getScene/' + this.table.sceneId, {}, false).then(response => { - // this.currGroup = response.data - // - // this.$nextTick(function() { - // this.sceneMode = true - // this.tableTree() - // }) - // }) - // } this.treeNode(this.groupForm) }, search(val) { @@ -217,14 +207,6 @@ export default { } }, - // tree(group) { - // this.dsLoading = true - // post('/dataset/group/tree', group, false).then(response => { - // this.data = response.data - // this.dsLoading = false - // }) - // }, - treeNode(group) { post('/dataset/group/treeNode', group).then(res => { this.data = res.data @@ -402,13 +384,12 @@ export default { searchTree(val) { const queryCondition = { - // withExtend: 'parent', - // modelType: 'dataset', - name: val + name: val, + sort: 'type asc,name asc,create_time desc', + mode: this.mode < 0 ? null : this.mode, + type: this.type, + typeFilter: this.customType ? this.customType : null } - // authModel(queryCondition).then(res => { - // this.data = this.buildTree(res.data) - // }) post('/dataset/table/search', queryCondition).then(res => { this.data = this.buildTree(res.data) }) @@ -422,8 +403,6 @@ export default { const roots = [] arrs.forEach(el => { // 判断根节点 ### - // el.type = el.modelInnerType - // el.isLeaf = el.leaf if (el[this.treeProps.parentId] === null || el[this.treeProps.parentId] === 0 || el[this.treeProps.parentId] === '0') { roots.push(el) return diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue index 81988abd51..459d81255c 100644 --- a/frontend/src/views/dataset/group/Group.vue +++ b/frontend/src/views/dataset/group/Group.vue @@ -86,10 +86,10 @@ {{ $t('dataset.custom_data') }} - - - - + + + {{ $t('dataset.union_data') }} + @@ -526,7 +526,7 @@ export default { case 'custom': this.addData('AddCustom') break - case 'custom1': + case 'union': this.addData('AddUnion') break }