feat: 视图过滤增加包含与不包含

This commit is contained in:
junjie 2021-07-06 11:01:08 +08:00
parent 43b7c2acd8
commit df0c0b8777
9 changed files with 54 additions and 15 deletions

View File

@ -200,7 +200,7 @@ public class DorisQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}
@ -241,7 +241,7 @@ public class DorisQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}
@ -327,7 +327,7 @@ public class DorisQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}

View File

@ -205,7 +205,7 @@ public class MysqlQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}
@ -247,7 +247,7 @@ public class MysqlQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}
@ -333,7 +333,7 @@ public class MysqlQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}

View File

@ -239,7 +239,7 @@ public class OracleQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}
@ -281,7 +281,7 @@ public class OracleQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}
@ -367,7 +367,7 @@ public class OracleQueryProvider extends QueryProvider {
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "in")) {
filter.append("('").append(StringUtils.join(f.getValue(), "','")).append("')");
} else if (StringUtils.containsIgnoreCase(f.getTerm(), "like")) {
filter.append("%").append(f.getValue()).append("%");
filter.append("'%").append(f.getValue()).append("%'");
} else {
filter.append("'").append(f.getValue()).append("'");
}

View File

@ -790,7 +790,9 @@ export default {
split_color: 'Split Color',
shadow: 'Shadow',
condition: 'Filter Value',
filter_value_can_null: 'Filter value can not empty'
filter_value_can_null: 'Filter value can not empty',
filter_like: 'Contain',
filter_not_like: 'Not Contain'
},
dataset: {
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',

View File

@ -790,7 +790,9 @@ export default {
split_color: '分割顏色',
shadow: '陰影',
condition: '過濾值',
filter_value_can_null: '過濾值不能為空'
filter_value_can_null: '過濾值不能為空',
filter_like: '包含',
filter_not_like: '不包含'
},
dataset: {
sheet_warn: '有多個sheet頁面默認抽取第一個',

View File

@ -790,7 +790,9 @@ export default {
split_color: '分割颜色',
shadow: '阴影',
condition: '过滤值',
filter_value_can_null: '过滤值不能为空'
filter_value_can_null: '过滤值不能为空',
filter_like: '包含',
filter_not_like: '不包含'
},
dataset: {
sheet_warn: '有多个 Sheet 页,默认抽取第一个',

View File

@ -53,7 +53,18 @@ export default {
value: 'not_eq',
label: this.$t('chart.filter_not_eq')
}]
}, {
},
{
label: '',
options: [{
value: 'like',
label: this.$t('chart.filter_like')
}, {
value: 'not like',
label: this.$t('chart.filter_not_like')
}]
},
{
label: '',
options: [{
value: 'lt',

View File

@ -53,7 +53,18 @@ export default {
value: 'not_eq',
label: this.$t('chart.filter_not_eq')
}]
}, {
},
{
label: '',
options: [{
value: 'like',
label: this.$t('chart.filter_like')
}, {
value: 'not like',
label: this.$t('chart.filter_not_like')
}]
},
{
label: '',
options: [{
value: 'lt',

View File

@ -69,7 +69,18 @@ export default {
value: 'not_eq',
label: this.$t('chart.filter_not_eq')
}]
}, {
},
{
label: '',
options: [{
value: 'like',
label: this.$t('chart.filter_like')
}, {
value: 'not like',
label: this.$t('chart.filter_not_like')
}]
},
{
label: '',
options: [{
value: 'lt',