mirror of
https://github.com/dataease/dataease.git
synced 2026-05-19 10:18:11 +08:00
fix: 视图过滤不能设置无限制
This commit is contained in:
@@ -747,8 +747,8 @@ export default {
|
||||
chart_funnel: 'Funnel',
|
||||
chart_radar: 'Radar',
|
||||
chart_gauge: 'Gauge',
|
||||
dateStyle: '日期顯示',
|
||||
datePattern: '日期格式',
|
||||
dateStyle: 'Date Style',
|
||||
datePattern: 'Date Format',
|
||||
y: 'Year',
|
||||
y_M: 'Year Month',
|
||||
y_M_d: 'Year Month Day',
|
||||
@@ -788,7 +788,9 @@ export default {
|
||||
label_fontsize: 'Label Fontsize',
|
||||
split_line: 'Split Line',
|
||||
split_color: 'Split Color',
|
||||
shadow: 'Shadow'
|
||||
shadow: 'Shadow',
|
||||
condition: 'Filter Value',
|
||||
filter_value_can_null: 'Filter value can not empty'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
|
||||
|
||||
@@ -788,7 +788,9 @@ export default {
|
||||
label_fontsize: '標簽大小',
|
||||
split_line: '分割線',
|
||||
split_color: '分割顏色',
|
||||
shadow: '陰影'
|
||||
shadow: '陰影',
|
||||
condition: '過濾值',
|
||||
filter_value_can_null: '過濾值不能為空'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多個sheet頁面,默認抽取第一個',
|
||||
|
||||
@@ -788,7 +788,9 @@ export default {
|
||||
label_fontsize: '标签大小',
|
||||
split_line: '分割线',
|
||||
split_color: '分割颜色',
|
||||
shadow: '阴影'
|
||||
shadow: '阴影',
|
||||
condition: '过滤值',
|
||||
filter_value_can_null: '过滤值不能为空'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多个 Sheet 页,默认抽取第一个',
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.condition')" size="mini" clearable />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="text" icon="el-icon-delete" circle style="float: right" @click="removeFilter(index)" />
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.condition')" size="mini" clearable />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="text" icon="el-icon-delete" circle style="float: right" @click="removeFilter(index)" />
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.no_limit')" size="mini" clearable />
|
||||
<el-input v-show="!f.term.includes('null')" v-model="f.value" class="value-item" :placeholder="$t('chart.condition')" size="mini" clearable />
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="text" icon="el-icon-delete" circle style="float: right" @click="removeFilter(index)" />
|
||||
|
||||
@@ -878,6 +878,17 @@ export default {
|
||||
this.dimensionFilterEdit = false
|
||||
},
|
||||
saveDimensionFilter() {
|
||||
for (let i = 0; i < this.dimensionItem.filter.length; i++) {
|
||||
const f = this.dimensionItem.filter[i]
|
||||
if (!f.term.includes('null') && (!f.value || f.value === '')) {
|
||||
this.$message({
|
||||
message: this.$t('chart.filter_value_can_null'),
|
||||
type: 'error',
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
this.view.xaxis[this.dimensionItem.index].filter = this.dimensionItem.filter
|
||||
this.save(true)
|
||||
this.closeDimensionFilter()
|
||||
@@ -891,6 +902,17 @@ export default {
|
||||
this.quotaFilterEdit = false
|
||||
},
|
||||
saveQuotaFilter() {
|
||||
for (let i = 0; i < this.quotaItem.filter.length; i++) {
|
||||
const f = this.quotaItem.filter[i]
|
||||
if (!f.term.includes('null') && (!f.value || f.value === '')) {
|
||||
this.$message({
|
||||
message: this.$t('chart.filter_value_can_null'),
|
||||
type: 'error',
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
this.view.yaxis[this.quotaItem.index].filter = this.quotaItem.filter
|
||||
this.save(true)
|
||||
this.closeQuotaFilter()
|
||||
@@ -914,6 +936,14 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!f.term.includes('null') && (!f.value || f.value === '')) {
|
||||
this.$message({
|
||||
message: this.$t('chart.filter_value_can_null'),
|
||||
type: 'error',
|
||||
showClose: true
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
this.view.customFilter = this.chartForFilter.customFilter
|
||||
this.save(true)
|
||||
|
||||
Reference in New Issue
Block a user