优化数据记录导出判断,重新查询之后再进行导出判断
This commit is contained in:
parent
8709c3b610
commit
2559b597f5
@ -285,6 +285,26 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 导出数据 */
|
/** 导出数据 */
|
||||||
exportData() {
|
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) {
|
if (this.total > 10000) {
|
||||||
this.$message({
|
this.$message({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
|
@ -257,6 +257,26 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
/** 导出数据 */
|
/** 导出数据 */
|
||||||
exportData() {
|
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) {
|
if (this.total > 10000) {
|
||||||
this.$message({
|
this.$message({
|
||||||
showClose: true,
|
showClose: true,
|
||||||
|
@ -490,7 +490,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.getMonitorPartList();
|
this.getMonitorPartList();
|
||||||
this.getPlcMonitorParamsList();
|
this.getPlcMonitorParamsList();
|
||||||
this.getSensorMonitorParamsList();
|
// this.getSensorMonitorParamsList();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
Reference in New Issue
Block a user