diff --git a/src/views/scada/scadaQuery/index.vue b/src/views/scada/scadaQuery/index.vue index d909857..12cb24f 100644 --- a/src/views/scada/scadaQuery/index.vue +++ b/src/views/scada/scadaQuery/index.vue @@ -350,7 +350,7 @@ export default { } }, async exportExcel () { - const data = this.excelData.length < 1 ? this.data : this.excelData // 如果没有使用 this.excelData为空则代表没有使用筛选 + const data = this.excelData.length === 0 ? this.data : this.excelData const columns = this.columns this.$export.excel({ columns, @@ -386,6 +386,10 @@ export default { this.$message.error('区间筛选所设定最大值不能小于或等于最小值') return false } + if (this.selected.numberCompareMethod === '' && this.selected.stringCompareMethod === '') { + this.$message.error('请先选择比较方法!') + return false + } this.excelData = [] this.key = !this.key // 取反重新组件渲染 }, @@ -417,9 +421,6 @@ export default { default: return e } - }, - stringCompare (val, other) { - return other.indexOf(val) > -1 } }, mounted () {