|
@@ -76,26 +76,14 @@ export function exportToExcel(datas, fn) {
|
|
|
|
|
|
// 数据
|
|
|
let expand = _transferDataToXlsx(datas)
|
|
|
- console.log("expand: ", expand);
|
|
|
+ // console.log("expand: ", expand);
|
|
|
|
|
|
// 合并表头
|
|
|
const merges = ['A1:A2', 'B1:B2', 'C1:C2', 'D1:I1', 'J1:O1', 'P1:V1', 'W1:AC1']
|
|
|
|
|
|
// 合并列
|
|
|
- // let projectSet = _calcProjectRowMap(expand)
|
|
|
let boxSet = _calcBoxRowMap(expand)
|
|
|
- console.log("boxSet: ", boxSet);
|
|
|
- // 计算项目合并列
|
|
|
- // if (projectSet.length > 0) {
|
|
|
- // let first = projectSet[0]
|
|
|
- // merges.push('A'+(3+first.s)+':A'+(3+first.l-1))
|
|
|
- // for (let i = 1; i < projectSet.length; i++) {
|
|
|
- // let pre = projectSet[i - 1]
|
|
|
- // let cur = projectSet[i]
|
|
|
- // let start = 3 + pre.s + pre.l
|
|
|
- // merges.push('A'+start+':A'+(start+cur.l-1))
|
|
|
- // }
|
|
|
- // }
|
|
|
+
|
|
|
// 计算盒子/盒子运行状态/盒子运行模式合并列
|
|
|
if (boxSet.length > 0) {
|
|
|
let first = boxSet[0]
|
|
@@ -111,7 +99,6 @@ export function exportToExcel(datas, fn) {
|
|
|
merges.push('C'+start+':C'+(start+cur.l-1))
|
|
|
}
|
|
|
}
|
|
|
- console.log("merges: ", merges);
|
|
|
|
|
|
// 导出
|
|
|
Export2ExcelMerge({
|
|
@@ -152,7 +139,7 @@ function _transferDataToXlsx(boxList) {
|
|
|
let tableData = []
|
|
|
boxList.forEach((b) => {
|
|
|
// 继续判断有多少单机,主机、新风机、换热站、末端单机数量取最大值
|
|
|
- let maxCnt = define.calcMaxStandaloneCntExt(b);
|
|
|
+ let maxCnt = define.calcMaxStandaloneCnt(b);
|
|
|
for (let i = 0; i < maxCnt; i++) {
|
|
|
let hpStandalone =
|
|
|
b.hostCtrl && i < b.hostCtrl.length ? b.hostCtrl[i] : undefined;
|