diff --git a/tzipc-ui/src/views/ipc/dataLog/plcDataLog.vue b/tzipc-ui/src/views/ipc/dataLog/plcDataLog.vue index 03d388d..2ad3bc8 100644 --- a/tzipc-ui/src/views/ipc/dataLog/plcDataLog.vue +++ b/tzipc-ui/src/views/ipc/dataLog/plcDataLog.vue @@ -285,6 +285,26 @@ export default { methods: { /** 导出数据 */ exportData() { + this.queryParams.pageNum = 1; + this.queryParams.startTime = null; + this.queryParams.endTime = null; + if (this.queryParams.datetimerange && this.queryParams.datetimerange[0]) { + this.queryParams.startTime = this.dateToStr( + this.queryParams.datetimerange[0] + ); + this.queryParams.endTime = this.dateToStr( + this.queryParams.datetimerange[1] + ); + } + this.loading = true; + getPlcDataLog(this.queryParams).then((response) => { + this.dataList = response.data.rows; + this.total = response.data.total; + this.loading = false; + this.downloadFile(); + }); + }, + downloadFile() { if (this.total > 10000) { this.$message({ showClose: true, diff --git a/tzipc-ui/src/views/ipc/dataLog/sensorDataLog.vue b/tzipc-ui/src/views/ipc/dataLog/sensorDataLog.vue index 0e6562a..c33f4ec 100644 --- a/tzipc-ui/src/views/ipc/dataLog/sensorDataLog.vue +++ b/tzipc-ui/src/views/ipc/dataLog/sensorDataLog.vue @@ -257,6 +257,26 @@ export default { methods: { /** 导出数据 */ exportData() { + this.queryParams.pageNum = 1; + this.queryParams.startTime = null; + this.queryParams.endTime = null; + if (this.queryParams.datetimerange && this.queryParams.datetimerange[0]) { + this.queryParams.startTime = this.dateToStr( + this.queryParams.datetimerange[0] + ); + this.queryParams.endTime = this.dateToStr( + this.queryParams.datetimerange[1] + ); + } + this.loading = true; + getSensorDataLog(this.queryParams).then((response) => { + this.dataList = response.data.rows; + this.total = response.data.total; + this.loading = false; + this.downloadFile(); + }); + }, + downloadFile() { if (this.total > 10000) { this.$message({ showClose: true, diff --git a/tzipc-ui/src/views/ipc/rulesConfig/index.vue b/tzipc-ui/src/views/ipc/rulesConfig/index.vue index 6d4de49..020585a 100644 --- a/tzipc-ui/src/views/ipc/rulesConfig/index.vue +++ b/tzipc-ui/src/views/ipc/rulesConfig/index.vue @@ -490,7 +490,7 @@ export default { created() { this.getMonitorPartList(); this.getPlcMonitorParamsList(); - this.getSensorMonitorParamsList(); + // this.getSensorMonitorParamsList(); this.getList(); }, methods: {