fix: 月度数据-数据总览去除高低报值;修改名称
This commit is contained in:
parent
b3f842e4e7
commit
5fd4b77bba
|
@ -30,7 +30,17 @@
|
|||
:border="true"
|
||||
:header-cell-style="headerStyle"
|
||||
>
|
||||
<el-table-column prop="month" label="名称">
|
||||
<!-- <el-table-column label="港区">
|
||||
<template slot-scope="scope">
|
||||
{{ deptName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="月份">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ dateValue.replace("-", "年") }}月</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="month" label="名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ getTableFirstColumnName(scope.row) }}
|
||||
</template>
|
||||
|
@ -41,18 +51,6 @@
|
|||
align="center"
|
||||
:formatter="dataFormatter"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="avgDbz"
|
||||
label="低报值"
|
||||
align="center"
|
||||
:formatter="dataFormatter"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="avgGbz"
|
||||
label="高报值"
|
||||
align="center"
|
||||
:formatter="dataFormatter"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
:data="cmDeviceDs"
|
||||
|
@ -120,10 +118,10 @@ export default {
|
|||
this.queryData();
|
||||
},
|
||||
getTableFirstColumnName(row) {
|
||||
if (row.month && row.month === this.month) {
|
||||
if (row.month && row.month === this.dateValue) {
|
||||
return "本月均值";
|
||||
}
|
||||
if (row.month && row.month !== this.month) {
|
||||
if (row.month && row.month !== this.dateValue) {
|
||||
return "上月均值";
|
||||
}
|
||||
return "变化率";
|
||||
|
@ -172,8 +170,8 @@ export default {
|
|||
const ws_name = "SheetJS";
|
||||
const ws_data = [
|
||||
[filename],
|
||||
["名称", "读数", "低报值", "高报值"],
|
||||
...this.overViewTableData.map(row => [this.getTableFirstColumnName(row), row.avgDs, row.avgDbz, row.avgGbz]),
|
||||
["名称", "读数",],
|
||||
...this.overViewTableData.map(row => [this.getTableFirstColumnName(row), row.avgDs,]),
|
||||
["港区", "企业", "编号", "平均值"],
|
||||
...this.cmDeviceDs.map(row => [row.gangQu, row.deptName, row.sn, row.avgDs]),
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue