Commit f0f72703 authored by 朱超's avatar 朱超

换热站能耗

parent 459cd631
...@@ -97,7 +97,15 @@ ...@@ -97,7 +97,15 @@
</td> </td>
</tr> </tr>
</table> </table>
<el-table :data="tableData" style="width: 100%; margin-top: 10px"> <el-table
:data="tableData"
style="width: 100%; margin-top: 10px"
class="eltable"
:summary-method="getSummaries"
show-summary
stripe
:header-cell-style="{ backgroundColor: '#dfe8f6', color: '#213547' }"
>
<el-table-column prop="sn" label="序号" width="60" align="center" /> <el-table-column prop="sn" label="序号" width="60" align="center" />
<el-table-column prop="jurisdictionName" label="片区" /> <el-table-column prop="jurisdictionName" label="片区" />
<el-table-column prop="transferName" label="换热站名称" /> <el-table-column prop="transferName" label="换热站名称" />
...@@ -121,7 +129,7 @@ ...@@ -121,7 +129,7 @@
id="exlBlock" id="exlBlock"
cellpadding="0" cellpadding="0"
cellspacing="1" cellspacing="1"
style="margin-top: 5px; background-color: #99bbe8" style="margin-top: 5px"
> >
<tr> <tr>
<td colspan="2">起始时间:{{ enertyInfo.startTime }}</td> <td colspan="2">起始时间:{{ enertyInfo.startTime }}</td>
...@@ -302,8 +310,7 @@ function timeFun() { ...@@ -302,8 +310,7 @@ function timeFun() {
const preday = new Date(today); const preday = new Date(today);
preday.setDate(preday.getDate() - 1); preday.setDate(preday.getDate() - 1);
today.setDate(today.getDate()); today.setDate(today.getDate());
enertyInfo.startTime = enertyInfo.startTime = preday.toISOString().split("T")[0];
preday.toISOString().split("T")[0];
enertyInfo.endTime = today.toISOString().split("T")[0]; enertyInfo.endTime = today.toISOString().split("T")[0];
} }
...@@ -365,7 +372,12 @@ function postTransferEnergyFun() { ...@@ -365,7 +372,12 @@ function postTransferEnergyFun() {
loading.value = true; loading.value = true;
postTransferEnergy(enertyInfo).then((res) => { postTransferEnergy(enertyInfo).then((res) => {
if (res.success === true) { if (res.success === true) {
tableData.value = res.data; res.data.forEach((item, index) => {
item.area = item.area.toFixed(4);
if (item.transferName != "总计") {
tableData.value.push(item);
}
});
} else { } else {
ElMessage.error(res.message); ElMessage.error(res.message);
} }
...@@ -403,13 +415,7 @@ onUnmounted(() => {}); ...@@ -403,13 +415,7 @@ onUnmounted(() => {});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.contentBlock { .contentBlock {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ffffff; background-color: #ffffff;
overflow: auto;
} }
table { table {
width: 100%; width: 100%;
...@@ -465,4 +471,17 @@ table.botList td { ...@@ -465,4 +471,17 @@ table.botList td {
height: auto !important; height: auto !important;
} }
} }
.eltable {
height: 60vh;
}
@media (min-width: 1700px) {
.eltable {
height: 68vh;
}
}
@media (min-width: 2560px) {
.eltable {
height: 76vh;
}
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment