feat: 修改生成日报和月报表
This commit is contained in:
parent
b52c990fb5
commit
f51655b416
|
@ -68,6 +68,14 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :md="12" :sm="24">
|
||||
<el-form-item label="自采点位编号" prop="xcode" label-width="120">
|
||||
<el-input
|
||||
v-model="form.xcode"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input
|
||||
|
|
|
@ -1107,15 +1107,15 @@ export default {
|
|||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.hour;
|
||||
seriesData0[ind] = item.total_production; //总产量
|
||||
// seriesData1[ind] = item.production_hour; //台时产量
|
||||
// seriesData2[ind] = item.run_rate; //运转率
|
||||
seriesData3[ind] = item.elec_consume_unit; //分布电耗
|
||||
if(item.total_production < 1){
|
||||
seriesData0[ind] = 0;
|
||||
seriesData3[ind] = 0;
|
||||
}else{seriesData0[ind] = item.total_production; //总产量
|
||||
seriesData3[ind] = item.elec_consume_unit; //分布电耗}
|
||||
}
|
||||
});
|
||||
let options = { ...that.option1 };
|
||||
options.series[0].data = seriesData0;
|
||||
// options.series[1].data = seriesData1;
|
||||
// options.series[2].data = seriesData2;
|
||||
options.series[1].data = seriesData3;
|
||||
let hourXAxis = [];
|
||||
for (let i = 0; i < 24; i++) {
|
||||
|
|
|
@ -254,16 +254,6 @@
|
|||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
// updateTableHeaders() {
|
||||
// let that = this;
|
||||
// // 假设 tableDatas 至少有一行数据,且列数始终 >= 3
|
||||
// if (this.tableDatas.length > 0) {
|
||||
// let columnCount = this.tableDatas[0].length - 3; // 计算有多少天
|
||||
// this.tableHeaders = Array.from({ length: columnCount }, (_, i) => i + 1);
|
||||
// } else {
|
||||
// this.tableHeaders = [];
|
||||
// }
|
||||
// },
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myReport', this.tableName)
|
||||
|
@ -271,6 +261,7 @@
|
|||
},
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.topTableDiv{
|
||||
|
|
Loading…
Reference in New Issue