diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 1734757d90..ba40852ec5 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -1721,3 +1721,34 @@ div:focus { display: inline-block; } } + +.operator-bar { + width: 100%; + height: 70px; + display: flex; + align-items: center; + justify-content: space-between; + position: sticky; + background: #fff; + top: 0; + z-index: 15; + .title { + font-family: PingFang SC; + font-size: 16px; + font-weight: 500; + line-height: 24px; + color: #1f2329; + } +} + +.el-table-column--selection { + .cell { + padding: 0 14px !important; + } +} + +.dept-popper { + .el-tree-node__label { + color: var(--deTextPrimary, #1F2329) !important; + } +} \ No newline at end of file diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index 2aadd10f1c..d3f0f66eba 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -698,17 +698,17 @@ export default { }, keywords(val) { if (!val) { - this.tableDataCopy = [...this.tableData] - this.fieldDataCopy = [...this.fieldData] + this.tableDataCopy = this.arrSort([...this.tableData], 'name') + this.fieldDataCopy = this.arrSort([...this.fieldData]) return } if (this.dataSource && !this.dataTable) { - this.tableDataCopy = this.tableData.filter(ele => ele.name.includes(val)) + this.tableDataCopy = this.arrSort(this.tableData.filter(ele => ele.name.includes(val)), 'name') } if (this.dataSource && this.dataTable) { - this.fieldDataCopy = this.fieldData.filter(ele => ele.fieldName.includes(val)) + this.fieldDataCopy = this.arrSort(this.fieldData.filter(ele => ele.fieldName.includes(val))) } } }, @@ -760,7 +760,7 @@ export default { info: JSON.stringify({ table: name }) }).then((res) => { this.fieldData = res.data - this.fieldDataCopy = [...this.fieldData] + this.fieldDataCopy = this.arrSort([...this.fieldData]) }) .finally(() => { this.tableLoading = false @@ -818,12 +818,19 @@ export default { post('/datasource/getTables/' + this.dataSource, {}) .then((response) => { this.tableData = response.data - this.tableDataCopy = [...this.tableData] + this.tableDataCopy = this.arrSort([...this.tableData], 'name') }) .finally(() => { this.tableLoading = false }) }, + arrSort(arr = [], field = 'fieldName') { + arr.sort((a, b) => { + return a[field][0].toLowerCase().charCodeAt() - b[field][0].toLowerCase().charCodeAt() + }) + + return arr + }, calHeight: _.debounce(function() { const sqlHeight = Math.max(this.sqlHeight, 248) const currentHeight = document.documentElement.clientHeight diff --git a/frontend/src/views/dataset/data/components/filterFiled.vue b/frontend/src/views/dataset/data/components/filterFiled.vue index 3fcd8a0598..59a5e13847 100644 --- a/frontend/src/views/dataset/data/components/filterFiled.vue +++ b/frontend/src/views/dataset/data/components/filterFiled.vue @@ -128,7 +128,7 @@ />