diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index b657d2fc5c..c9911a4189 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1256,8 +1256,8 @@ export default { fieldFilter(val) { if (val && val !== '') { - this.dimensionData = JSON.parse(JSON.stringify(this.dimension.filter(ele => { return ele.name.includes(val) }))) - this.quotaData = JSON.parse(JSON.stringify(this.quota.filter(ele => { return ele.name.includes(val) }))) + this.dimensionData = JSON.parse(JSON.stringify(this.dimension.filter(ele => { return ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) }))) + this.quotaData = JSON.parse(JSON.stringify(this.quota.filter(ele => { return ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) }))) } else { this.dimensionData = JSON.parse(JSON.stringify(this.dimension)) this.quotaData = JSON.parse(JSON.stringify(this.quota)) diff --git a/frontend/src/views/dataset/add/AddDB.vue b/frontend/src/views/dataset/add/AddDB.vue index c9534b7913..22dd735f3d 100644 --- a/frontend/src/views/dataset/add/AddDB.vue +++ b/frontend/src/views/dataset/add/AddDB.vue @@ -33,7 +33,7 @@ - + @@ -100,7 +100,7 @@ export default { }, searchTable(val) { if (val && val !== '') { - this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.name.includes(val) }))) + this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) }))) } else { this.tableData = JSON.parse(JSON.stringify(this.tables)) } diff --git a/frontend/src/views/dataset/common/DatasetGroupSelector.vue b/frontend/src/views/dataset/common/DatasetGroupSelector.vue index 9f54632e4b..92fc17c7cc 100644 --- a/frontend/src/views/dataset/common/DatasetGroupSelector.vue +++ b/frontend/src/views/dataset/common/DatasetGroupSelector.vue @@ -202,7 +202,7 @@ export default { }, search(val) { if (val && val !== '') { - this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.name.includes(val) }))) + this.tableData = JSON.parse(JSON.stringify(this.tables.filter(ele => { return ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) }))) } else { this.tableData = JSON.parse(JSON.stringify(this.tables)) } diff --git a/frontend/src/views/dataset/data/CalcFieldEdit.vue b/frontend/src/views/dataset/data/CalcFieldEdit.vue index 63f3bdf3c3..5b5cc96e6f 100644 --- a/frontend/src/views/dataset/data/CalcFieldEdit.vue +++ b/frontend/src/views/dataset/data/CalcFieldEdit.vue @@ -55,19 +55,26 @@ - + {{ $t('dataset.click_ref_field') }} -
+ +
{{ $t('chart.dimension') }} - + @@ -77,17 +84,17 @@
-
+
{{ $t('chart.quota') }} - + @@ -98,11 +105,18 @@
- + {{ $t('dataset.click_ref_function') }} - + + ele.extField === 0) + this.quotaData = JSON.parse(JSON.stringify(this.tableFields.quotaList)).filter(ele => ele.extField === 0) + }, + 'searchField': function(val) { + if (val && val !== '') { + this.dimensionData = JSON.parse(JSON.stringify(this.tableFields.dimensionList.filter(ele => ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) && ele.extField === 0))) + this.quotaData = JSON.parse(JSON.stringify(this.tableFields.quotaList.filter(ele => ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) && ele.extField === 0))) + } else { + this.dimensionData = JSON.parse(JSON.stringify(this.tableFields.dimensionList)).filter(ele => ele.extField === 0) + this.quotaData = JSON.parse(JSON.stringify(this.tableFields.quotaList)).filter(ele => ele.extField === 0) + } + }, + 'searchFunction': function(val) { + if (val && val !== '') { + this.functionData = JSON.parse(JSON.stringify(this.functions.filter(ele => { return ele.func.toLocaleLowerCase().includes(val.toLocaleLowerCase()) }))) + } else { + this.functionData = JSON.parse(JSON.stringify(this.functions)) + } } }, mounted() { @@ -230,6 +269,8 @@ export default { }) this.initFunctions() this.initField() + this.dimensionData = JSON.parse(JSON.stringify(this.tableFields.dimensionList)).filter(ele => ele.extField === 0) + this.quotaData = JSON.parse(JSON.stringify(this.tableFields.quotaList)).filter(ele => ele.extField === 0) }, methods: { onCmReady(cm) { @@ -253,6 +294,7 @@ export default { initFunctions() { post('/dataset/function/listByTableId/' + this.param.id, null).then(response => { this.functions = response.data + this.functionData = JSON.parse(JSON.stringify(this.functions)) }) }, @@ -292,6 +334,10 @@ export default { size: 0, extField: 2 } + this.dimensionData = [] + this.quotaData = [] + this.searchField = '' + this.searchFunction = '' } } } @@ -322,7 +368,7 @@ export default { } .padding-lr { - padding: 0 6px; + padding: 0 4px; } .field-height{ height: calc(50% - 20px); diff --git a/frontend/src/views/dataset/data/FieldEdit.vue b/frontend/src/views/dataset/data/FieldEdit.vue index cc1dfc47dd..e71e8fe46b 100644 --- a/frontend/src/views/dataset/data/FieldEdit.vue +++ b/frontend/src/views/dataset/data/FieldEdit.vue @@ -354,8 +354,8 @@ export default { filterField(val) { if (val && val !== '') { - this.tableFields.dimensionListData = JSON.parse(JSON.stringify(this.tableFields.dimensionListData.filter(ele => { return ele.name.includes(val) }))) - this.tableFields.quotaListData = JSON.parse(JSON.stringify(this.tableFields.quotaList.filter(ele => { return ele.name.includes(val) }))) + this.tableFields.dimensionListData = JSON.parse(JSON.stringify(this.tableFields.dimensionListData.filter(ele => { return ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) }))) + this.tableFields.quotaListData = JSON.parse(JSON.stringify(this.tableFields.quotaList.filter(ele => { return ele.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()) }))) } else { this.tableFields.dimensionListData = JSON.parse(JSON.stringify(this.tableFields.dimensionList)) this.tableFields.quotaListData = JSON.parse(JSON.stringify(this.tableFields.quotaList))