|
|
|
@ -100,9 +100,9 @@ |
|
|
|
<div class="success-btn" style="margin-left: 0.24rem"> |
|
|
|
<div class="success-btn" style="margin-left: 0.24rem"> |
|
|
|
<el-button type="success" @click="findData">查询</el-button> |
|
|
|
<el-button type="success" @click="findData">查询</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <div class="warning-bnt" style="margin-left: 0.24rem"> |
|
|
|
<div class="warning-bnt" style="margin-left: 0.15rem"> |
|
|
|
<el-button type="warning" @click="exportData">导出</el-button> |
|
|
|
<el-button type="warning" @click="exportData">导出</el-button> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="charts-table" v-loading="listLoading"> |
|
|
|
<div class="charts-table" v-loading="listLoading"> |
|
|
|
@ -890,20 +890,20 @@ export default { |
|
|
|
this.exportArr.push(newData); |
|
|
|
this.exportArr.push(newData); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// // console.log("导出的数据", this.exportArr); |
|
|
|
// console.log("导出的数据", this.exportArr); |
|
|
|
// import("@/assets/excel/Export2Excel").then((excel) => { |
|
|
|
import("@/assets/excel/Export2Excel").then((excel) => { |
|
|
|
// let filterVal = ["dateList", "curValue2", "lastValue2", "yoy2", "mom2"]; // 导出的excel表头字段名,需要导出表格字段名 |
|
|
|
let filterVal = ["dateList", "curValue2", "lastValue2", "yoy2", "mom2"]; // 导出的excel表头字段名,需要导出表格字段名 |
|
|
|
// let tHeader = ["时间", "本期", "同期", "同比", "环比"]; // 导出的excel表头名信息 |
|
|
|
let tHeader = ["时间", "本期", "同期", "同比", "环比"]; // 导出的excel表头名信息 |
|
|
|
// const data = this.formatJson(filterVal, this.exportArr); |
|
|
|
const data = this.formatJson(filterVal, this.exportArr); |
|
|
|
// const autoWidth = true; |
|
|
|
const autoWidth = true; |
|
|
|
// excel.export_json_to_excel({ |
|
|
|
excel.export_json_to_excel({ |
|
|
|
// header: tHeader, //表头 |
|
|
|
header: tHeader, //表头 |
|
|
|
// data, //数据 |
|
|
|
data, //数据 |
|
|
|
// filename: `${this.checkList}同比环比分析报表`, //名称 |
|
|
|
filename: `${this.checkList}同比环比分析报表(${this.startTime}至${this.endTime})`, //名称 |
|
|
|
// autoWidth: true, //宽度自适应 |
|
|
|
autoWidth: true, //宽度自适应 |
|
|
|
// }); |
|
|
|
}); |
|
|
|
// this.$message.success("导出成功!"); |
|
|
|
this.$message.success("导出成功!"); |
|
|
|
// }); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//格式转换,不需要改动 |
|
|
|
//格式转换,不需要改动 |
|
|
|
formatJson(filterVal, jsonData) { |
|
|
|
formatJson(filterVal, jsonData) { |
|
|
|
|