forked from github/dataease
refactor(视图): 表格阈值null与空字符串合并成一个条件
This commit is contained in:
parent
c07b4326e3
commit
e83687c9e7
@ -541,7 +541,7 @@ function mappingColor(value, defaultColor, field, type) {
|
||||
} else if (i === field.conditions.length - 1) {
|
||||
color = defaultColor
|
||||
}
|
||||
} else if (field.field.deType === 0) {
|
||||
} else if (field.field.deType === 0 || field.field.deType === 5) {
|
||||
const tv = t.value
|
||||
if (t.term === 'eq') {
|
||||
if (value === tv) {
|
||||
@ -564,22 +564,12 @@ function mappingColor(value, defaultColor, field, type) {
|
||||
flag = true
|
||||
}
|
||||
} else if (t.term === 'null') {
|
||||
if (value === null || value === undefined) {
|
||||
if (value === null || value === undefined || value === '') {
|
||||
color = t[type]
|
||||
flag = true
|
||||
}
|
||||
} else if (t.term === 'not_null') {
|
||||
if (value !== null && value !== undefined) {
|
||||
color = t[type]
|
||||
flag = true
|
||||
}
|
||||
} else if (t.term === 'empty') {
|
||||
if (value === '') {
|
||||
color = t[type]
|
||||
flag = true
|
||||
}
|
||||
} else if (t.term === 'not_empty') {
|
||||
if (value !== '') {
|
||||
if (value !== null && value !== undefined && value !== '') {
|
||||
color = t[type]
|
||||
flag = true
|
||||
}
|
||||
|
@ -166,16 +166,6 @@ export default {
|
||||
value: 'not_null',
|
||||
label: this.$t('chart.filter_not_null')
|
||||
}]
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
options: [{
|
||||
value: 'empty',
|
||||
label: this.$t('chart.filter_empty')
|
||||
}, {
|
||||
value: 'not_empty',
|
||||
label: this.$t('chart.filter_not_empty')
|
||||
}]
|
||||
}
|
||||
],
|
||||
dateOptions: [
|
||||
|
Loading…
Reference in New Issue
Block a user