From 2559b597f52b25800d1ba76ba8b8a53e93f5cbb4 Mon Sep 17 00:00:00 2001 From: zhanghan11 Date: Fri, 12 Apr 2024 10:36:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=AF=BC=E5=87=BA=E5=88=A4=E6=96=AD=EF=BC=8C=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E6=9F=A5=E8=AF=A2=E4=B9=8B=E5=90=8E=E5=86=8D=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=AF=BC=E5=87=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tzipc-ui/src/views/ipc/dataLog/plcDataLog.vue | 20 +++++++++++++++++++ .../src/views/ipc/dataLog/sensorDataLog.vue | 20 +++++++++++++++++++ tzipc-ui/src/views/ipc/rulesConfig/index.vue | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) 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: {