处理下没传入比较方法的情况;清掉无用的method
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user