You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by xx...@apache.org on 2023/03/28 03:05:16 UTC
[kylin] 08/12: KYLIN-5485 auto complete editor keywords
This is an automated email from the ASF dual-hosted git repository.
xxyu pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git
commit c72fe0bd0cc503287bd69b515790bf2266c4f2b8
Author: Qian Xia <la...@gmail.com>
AuthorDate: Fri Mar 24 18:08:59 2023 +0800
KYLIN-5485 auto complete editor keywords
---
.../ModelList/ModelSaveConfig/index.vue | 33 +++++++++++-----------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/kystudio/src/components/studio/StudioModel/ModelList/ModelSaveConfig/index.vue b/kystudio/src/components/studio/StudioModel/ModelList/ModelSaveConfig/index.vue
index 1136808697..80f2ae78ea 100644
--- a/kystudio/src/components/studio/StudioModel/ModelList/ModelSaveConfig/index.vue
+++ b/kystudio/src/components/studio/StudioModel/ModelList/ModelSaveConfig/index.vue
@@ -577,23 +577,6 @@ export default class ModelPartitionModal extends Vue {
// })
return result
}
- // get formatList () {
- // if (!this.partitionMeta.column) {
- // return []
- // }
- // let partitionColumn = this.getColumnInfo(this.partitionMeta.column)
- // if (!partitionColumn) {
- // return []
- // } else {
- // if (timeDataType.indexOf(partitionColumn.datatype) === -1) {
- // this.partitionMeta.format = 'yyyy-MM-dd'
- // return this.integerFormat
- // } else {
- // this.partitionMeta.format = ''
- // return this.dateFormat
- // }
- // }
- // }
getColumnInfo (column) {
if (this.selectedTable) {
let len = this.selectedTable.columns && this.selectedTable.columns.length || 0
@@ -631,6 +614,9 @@ export default class ModelPartitionModal extends Vue {
}
this.filterCondition = this.modelDesc.filter_condition
this.originFilterCondition = this.modelDesc.filter_condition
+ this.$nextTick(() => {
+ this.setAutoCompleteData()
+ })
} else {
this.resetForm()
}
@@ -883,6 +869,19 @@ export default class ModelPartitionModal extends Vue {
})
return others
}
+ setAutoCompleteData () {
+ const columnList = this.modelInstance.getTableColumns()
+ let ad = columnList.map((col) => {
+ return {
+ meta: col.datatype,
+ caption: col.full_colname,
+ value: col.full_colname,
+ id: col.id,
+ scope: 1
+ }
+ })
+ this.$refs.dataFilterCond.$emit('setAutoCompleteData', ad)
+ }
}
</script>