diff --git a/src/views/dataManage/deviceData/listDigData.vue b/src/views/dataManage/deviceData/listDigData.vue index be4a9e4..3cb74ad 100644 --- a/src/views/dataManage/deviceData/listDigData.vue +++ b/src/views/dataManage/deviceData/listDigData.vue @@ -116,6 +116,8 @@ if (params && params.deviceType === this.type && params.devcode) { this.listQuery.keywords = params.devcode this.fetchData() + } else { + this.fetchData() } } }, @@ -134,7 +136,7 @@ // 全屏加载动画 const loading = this.$loading({ lock: true, - text: '数据处理中,请稍后...', + text: '下载中,请稍后...', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.7)' }) @@ -146,8 +148,6 @@ exportFile(blob, fileName) }).catch((res) => { loading.close() - }).catch((res) => { - loading.close() }) }, // 查询数据 @@ -161,21 +161,33 @@ this.listQuery.offset = 1 } this.handleDateTime() - }, - // 处理时间 - handleDateTime() { getDigData(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) this.listLoading = false }) }, + // 处理时间 + handleDateTime() { + if (this.timeRange && this.timeRange.length > 0) { + this.listQuery.beginTime = this.timeRange[0] + this.listQuery.endTime = this.timeRange[1] + } else { + this.listQuery.beginTime = '' + this.listQuery.endTime = '' + } + }, checkCell(value) { var cell = parseFloat(value) if (cell < 10) { return 'warning-state' } }, + // checkState(row) { + // if (row.status !== '0') { + // return 'warning-state' + // } + // }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { if (val && val.size) {