From 4bf8212c10eb9a1421e52b60e7407922d081ba8c Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 09 六月 2025 13:44:29 +0800 Subject: [PATCH] 1、设备TEEP页面大数据导出格式由xls调整为xlsx 2、大数据导出参数增加为查询区域所有字段 --- src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue index 7b3fa34..71f489c 100644 --- a/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue +++ b/src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue @@ -526,12 +526,19 @@ }) }, exportLongTimeExcel(fileName) { - // let param = this.getQueryParams() - // console.log('瀵煎嚭鍙傛暟', param) - const param = { + let param = { startTime: moment(this.dates[0]).format('YYYYMMDD'), endTime: moment(this.dates[1]).format('YYYYMMDD') } + Object.keys(this.queryParams).forEach(item => { + if (Array.isArray(this.queryParams[item])) { + param[item] = this.queryParams[item].join() + // 姝ゅ涓轰繚璇佹帴鍙e弬鏁颁笉澶氫綑锛屽彲鐪佺暐 + if (this.queryParams[item].length === 0) delete param[item] + } + }) + param = Object.assign({}, this.queryParam, param) + this.longTimeExportButtonLoading = true downFile(this.url.exportLongTimeXlsUrl, param) .then((data) => { @@ -543,13 +550,13 @@ return } if (typeof window.navigator.msSaveBlob !== 'undefined') { - window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls') + window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx') } else { let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' })) let link = document.createElement('a') link.style.display = 'none' link.href = url - link.setAttribute('download', fileName + '.xls') + link.setAttribute('download', fileName + '.xlsx') document.body.appendChild(link) link.click() document.body.removeChild(link) //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 @@ -620,8 +627,6 @@ this.tableHeads = [] this.dataList = [] this.spinning = true - console.log('requestAllDataSize', this.requestAllDataSize) - console.log('everyRequestDataSize', this.everyRequestDataSize) // 鑻ユ棩鏈熼�夋嫨鍣ㄨ缃殑鏌ヨ璇锋眰鏁伴噺瓒呰繃15鏉″垯寮�鍚噿鍔犺浇 if (this.requestAllDataSize > this.everyRequestDataSize) { // 寮�鍚噿鍔犺浇鍚庡皢缁撴潫鏃ユ湡璁剧疆涓哄紑濮嬫棩鏈熶箣鍚庣殑14澶╋紝鍗冲厛鏌ヨ15澶╁唴鐨勬暟鎹� @@ -642,7 +647,6 @@ this.tableHeads = res.result.dates this.dataList = res.result.mdcEfficiencyList - console.log('dataList', this.dataList) this.checkSameData(this.dataList) this.checkSameData1(this.dataList) this.checkSameData2(this.dataList) @@ -679,7 +683,6 @@ .then(res => { if (res.success) { this.tableHeads = [...this.tableHeads.slice(0, -2), ...res.result.dates] - console.log('dataList', this.dataList) this.dataList.forEach(item1 => { res.result.mdcEfficiencyList.forEach(item2 => { if (item1.equipmentId === item2.equipmentId) { -- Gitblit v1.9.3