forked from github/dataease
refactor: 视图过滤字段值优化
This commit is contained in:
parent
3e8568079c
commit
e3fdf9a4a5
@ -1014,7 +1014,8 @@ export default {
|
||||
enum_exp: 'Enum',
|
||||
pls_slc: 'Please Select',
|
||||
filter_exp: 'Filter Value',
|
||||
filter_type: 'Filter Type'
|
||||
filter_type: 'Filter Type',
|
||||
filter_value_can_not_str: 'Value type can not input string'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
|
||||
|
@ -1014,7 +1014,8 @@ export default {
|
||||
enum_exp: '字段枚舉值',
|
||||
pls_slc: '請選擇',
|
||||
filter_exp: '過濾值',
|
||||
filter_type: '過濾方式'
|
||||
filter_type: '過濾方式',
|
||||
filter_value_can_not_str: '數值類型字段過濾值不能包含文本'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多個 Sheet 頁,默認抽取第一個',
|
||||
|
@ -1016,7 +1016,8 @@ export default {
|
||||
enum_exp: '字段枚举值',
|
||||
pls_slc: '请选择',
|
||||
filter_exp: '过滤值',
|
||||
filter_type: '过滤方式'
|
||||
filter_type: '过滤方式',
|
||||
filter_value_can_not_str: '数值类型字段过滤值不能包含文本'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多个 Sheet 页,默认抽取第一个',
|
||||
|
@ -1638,6 +1638,14 @@ export default {
|
||||
})
|
||||
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') {
|
||||
this.view.yaxis[this.quotaItem.index].filter = this.quotaItem.filter
|
||||
@ -1686,6 +1694,16 @@ export default {
|
||||
})
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user