提交 e3fdf9a4 authored 作者: junjie's avatar junjie

refactor: 视图过滤字段值优化

上级 3e856807
...@@ -1014,7 +1014,8 @@ export default { ...@@ -1014,7 +1014,8 @@ export default {
enum_exp: 'Enum', enum_exp: 'Enum',
pls_slc: 'Please Select', pls_slc: 'Please Select',
filter_exp: 'Filter Value', filter_exp: 'Filter Value',
filter_type: 'Filter Type' filter_type: 'Filter Type',
filter_value_can_not_str: 'Value type can not input string'
}, },
dataset: { dataset: {
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default', sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
......
...@@ -1014,7 +1014,8 @@ export default { ...@@ -1014,7 +1014,8 @@ export default {
enum_exp: '字段枚舉值', enum_exp: '字段枚舉值',
pls_slc: '請選擇', pls_slc: '請選擇',
filter_exp: '過濾值', filter_exp: '過濾值',
filter_type: '過濾方式' filter_type: '過濾方式',
filter_value_can_not_str: '數值類型字段過濾值不能包含文本'
}, },
dataset: { dataset: {
sheet_warn: '有多個 Sheet 頁,默認抽取第一個', sheet_warn: '有多個 Sheet 頁,默認抽取第一個',
......
...@@ -1016,7 +1016,8 @@ export default { ...@@ -1016,7 +1016,8 @@ export default {
enum_exp: '字段枚举值', enum_exp: '字段枚举值',
pls_slc: '请选择', pls_slc: '请选择',
filter_exp: '过滤值', filter_exp: '过滤值',
filter_type: '过滤方式' filter_type: '过滤方式',
filter_value_can_not_str: '数值类型字段过滤值不能包含文本'
}, },
dataset: { dataset: {
sheet_warn: '有多个 Sheet 页,默认抽取第一个', sheet_warn: '有多个 Sheet 页,默认抽取第一个',
......
...@@ -1638,6 +1638,14 @@ export default { ...@@ -1638,6 +1638,14 @@ export default {
}) })
return return
} }
if (parseFloat(f.value).toString() === 'NaN') {
this.$message({
message: this.$t('chart.filter_value_can_not_str'),
type: 'error',
showClose: true
})
return
}
} }
if (this.quotaItem.filterType === 'quota') { if (this.quotaItem.filterType === 'quota') {
this.view.yaxis[this.quotaItem.index].filter = this.quotaItem.filter this.view.yaxis[this.quotaItem.index].filter = this.quotaItem.filter
...@@ -1686,6 +1694,16 @@ export default { ...@@ -1686,6 +1694,16 @@ export default {
}) })
return return
} }
if (this.filterItem.deType === 2 || this.filterItem.deType === 3) {
if (parseFloat(f.value).toString() === 'NaN') {
this.$message({
message: this.$t('chart.filter_value_can_not_str'),
type: 'error',
showClose: true
})
return
}
}
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论