Browse Source

1.修改风柜监测系统-新风阀的数据部分样式改为绿色

2.新增水电表抄表记录页面,写页面对接逻辑
3.使用element的多行或多列共用一个数据
meizhou
selia-zx 2 weeks ago
parent
commit
f813b951de
  1. 19
      src/api/comprehensiveEnergy/meterRecord.js
  2. 1
      src/assets/icons/svg/meterRecord.svg
  3. 68
      src/views/aircAndWindc/awSysMonitor/components/damperMonitor.vue
  4. 709
      src/views/comprehensiveEnergy/meterRecord/index.vue

19
src/api/comprehensiveEnergy/meterRecord.js

@ -0,0 +1,19 @@
import request from "@/utils/request";
export const meterReadingsList = (data) => {
return request({
url: "/reportMeterReadings/list",
method: "post",
data: data,
});
};
// 导出
export const meterReadingsExport = (data) => {
return request({
url: "/reportMeterReadings/export",
method: "post",
data,
responseType: "blob",
});
};

1
src/assets/icons/svg/meterRecord.svg

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1761011231553" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2521" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M925.425633 514.798111a38.910648 38.910648 0 0 0-25.59911-9.727662 38.398666 38.398666 0 0 0-28.415013 12.543564l-138.747178 153.594662a62.973812 62.973812 0 0 0-62.973812 62.973812 38.398666 38.398666 0 0 0 0 5.631804l-28.926995 31.742897a38.398666 38.398666 0 0 0 56.830026 51.198221l24.319155-26.879066a69.373589 69.373589 0 0 0 10.239644 0 62.973812 62.973812 0 0 0 63.229802-63.229802A66.045705 66.045705 0 0 0 793.590215 716.775092l106.74829-117.243926a214.008563 214.008563 0 1 1-167.674173-80.893189 38.398666 38.398666 0 0 0 0-76.797331 291.061886 291.061886 0 1 0 192.50531 72.701474z" p-id="2522"></path><path d="M365.317097 732.902532a367.859217 367.859217 0 0 1 367.603226-367.603226 112.124104 112.124104 0 0 1 38.398666 6.655769v-207.352795a38.398666 38.398666 0 0 0-38.398666-38.398666H455.681957V63.997776A63.997776 63.997776 0 0 0 391.684181 0H64.015567A63.997776 63.997776 0 0 0 0.017791 63.997776v921.567976A38.398666 38.398666 0 0 0 38.416457 1023.964417h470.51165a366.835252 366.835252 0 0 1-143.61101-291.061885zM293.639588 793.572423H167.179982a38.398666 38.398666 0 0 1 0-76.797331h126.459606a38.398666 38.398666 0 0 1 0 76.797331z m0-255.991104H167.179982a38.398666 38.398666 0 0 1 0-76.797331h126.459606a38.398666 38.398666 0 0 1 0 76.797331z m0-255.991104H167.179982a38.398666 38.398666 0 0 1 0-76.797332h126.459606a38.398666 38.398666 0 0 1 0 76.797332z" p-id="2523"></path></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

68
src/views/aircAndWindc/awSysMonitor/components/damperMonitor.vue

@ -458,7 +458,10 @@
>
</el-switch>
</div> -->
<div class="context-li" v-if="isObjectValid(damperHzBackObj)">
<div
class="context-li greenContext"
v-if="isObjectValid(damperHzBackObj)"
>
<div :class="getTextClass(damperHzBackObj, 'wind-text')">
风机频率反馈:
</div>
@ -515,28 +518,14 @@
</div>
</div>
<div class="fan-satatus2">
<div class="context-li" v-if="isObjectValid(waterValveObj)">
<div
class="context-li greenContext"
v-if="isObjectValid(waterValveObj)"
>
<div :class="getTextClass(waterValveObj, 'wind-text')">
水阀反馈
</div>
<el-form @submit.native.prevent>
<el-form-item>
<el-input
@keyup.enter.native="handleEnter(waterValveObj, $event, '%')"
@input="handleInput(waterValveObj)"
@blur="handleBlur()"
v-model="waterValveObj.collectValue"
disabled
size="mini"
>
<svg-icon
slot="prefix"
icon-class="percentage-icon"
class="percentage-icon"
/>
</el-input>
</el-form-item>
</el-form>
<div>{{ waterValveObj.collectValue }}%</div>
</div>
</div>
<div class="fan-satatus2-set">
@ -738,9 +727,7 @@
!automaticObj.collectValue
"
>
<div v-if="remoteManualObj.collectValue" class="off-bg">
运行
</div>
<div v-if="remoteManualObj.collectValue" class="off-bg">运行</div>
<div v-else class="off-bg">停止</div>
</div>
<!-- 时间表启停 -->
@ -2151,12 +2138,17 @@ export default {
align-items: center;
font-size: 0.18rem;
.wind-text {
color: #00d2ff;
//color: #00d2ff;
color: #39f833;
font-size: 0.18rem;
font-weight: bold;
white-space: nowrap;
}
.back-text {
margin-right: 0.1rem;
color: #39f833;
font-size: 0.18rem;
font-weight: bold;
}
}
.dampers-position2 {
@ -2237,12 +2229,16 @@ export default {
align-items: center;
font-size: 0.18rem;
.wind-text {
color: #00d2ff;
color: #39f833;
font-size: 0.18rem;
font-weight: bold;
white-space: nowrap;
}
.back-text {
margin-right: 0.1rem;
color: #39f833;
font-size: 0.18rem;
font-weight: bold;
}
}
.dampers-position7 {
@ -2323,12 +2319,16 @@ export default {
align-items: center;
font-size: 0.18rem;
.wind-text {
color: #00d2ff;
color: #39f833;
font-size: 0.18rem;
font-weight: bold;
white-space: nowrap;
}
.back-text {
margin-right: 0.1rem;
color: #39f833;
font-size: 0.18rem;
font-weight: bold;
}
}
.dampers-position11 {
@ -2440,9 +2440,14 @@ export default {
display: flex;
flex-direction: row;
align-items: center;
color: #00d2ff;
}
.greenContext {
color: #39f833;
font-size: 0.18rem;
font-weight: bold;
}
.wind-text {
color: #00d2ff;
font-size: 0.18rem;
margin-right: 0.15rem;
white-space: nowrap;
@ -2450,7 +2455,7 @@ export default {
}
.fan-satatus2-set {
position: absolute;
top: 5.8rem;
top: 5.7rem;
left: 3.5rem;
display: flex;
flex-direction: column;
@ -2485,9 +2490,14 @@ export default {
flex-direction: row;
align-items: center;
font-size: 0.18rem;
color: #00d2ff;
}
.greenContext {
color: #39f833;
font-size: 0.18rem;
font-weight: bold;
}
.wind-text {
color: #00d2ff;
font-size: 0.18rem;
margin-right: 0.15rem;
white-space: nowrap;

709
src/views/comprehensiveEnergy/meterRecord/index.vue

@ -0,0 +1,709 @@
<template>
<div class="app-container">
<div class="btn-condition">
<div class="condition-left" v-show="showSearch">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
>
<el-form-item label="日期" prop="msgCode">
<el-date-picker
style="width: auto"
v-model="dayValue"
type="date"
placeholder="选择日"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
</el-form>
<div class="primary-btn">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
</div>
<div class="warning-btn">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</div>
</div>
</div>
<div class="meter-Context">
<div class="meter-li">最高气温:{{ heightValue }}</div>
<div class="meter-li">最低气温:{{ lowValue }}</div>
<!-- <div class="meter-li">住房量:108</div> -->
</div>
<el-table
:data="tableData"
:span-method="arraySpanMethod"
:cell-style="tableRowStyle"
border
style="width: 100%"
v-loading="loading"
>
<el-table-column prop="mtType" label="名称" width="180">
<template #default="{ row, $index }">
<!-- 当是第 27 行时显示 amount7费用 的值 -->
<span
v-if="
$index === 8 ||
$index === 13 ||
$index === 18 ||
$index === 21 ||
$index === 23 ||
$index === 25 ||
$index === 26
"
>{{ row.location }}</span
>
<!-- 否则显示合计的值 -->
<span v-else>{{ row.mtType }}</span>
</template>
</el-table-column>
<el-table-column prop="location" label="位置"> </el-table-column>
<el-table-column prop="mtNum" sortable label="编号"> </el-table-column>
<el-table-column prop="yesterdayReading" sortable label="昨日读数">
</el-table-column>
<el-table-column prop="todayReading" sortable label="今日读数">
</el-table-column>
<el-table-column prop="mtRatio" sortable label="倍率"> </el-table-column>
<el-table-column prop="total" sortable label="合计">
<template #default="{ row, $index }">
<!-- 当是第 27 行时显示 amount7费用 的值 -->
<span v-if="$index === 26">{{ row.cost }}</span>
<!-- 否则显示合计的值 -->
<span v-else>{{ row.total }}</span>
</template>
</el-table-column>
<el-table-column prop="unitPrice" sortable label="单价"> </el-table-column>
<el-table-column prop="cost" sortable label="费用"> </el-table-column>
</el-table>
<el-table
:data="tableData2"
:span-method="objectSpanMethod"
border
style="width: 100%; margin-top: 20px"
>
<el-table-column prop="mtType" label="" width="180"> </el-table-column>
<el-table-column prop="location" label="分项"> </el-table-column>
<el-table-column prop="yesterdayReading" label="昨日流量"> </el-table-column>
<el-table-column prop="todayReading" label="今日流量"> </el-table-column>
<el-table-column prop="total" label="用量"> </el-table-column>
<el-table-column prop="remake" label="备注"> </el-table-column>
</el-table>
</div>
</template>
<script>
import { weatherTempData } from "@/api/centerairC/temHistory";
import {
meterReadingsList,
meterReadingsExport,
} from "@/api/comprehensiveEnergy/meterRecord";
export default {
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
postList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 0,
pageSize: 10,
startTime: "",
endTime: "",
},
dayValue: "",
monthValue: "",
lowValue: "", //
heightValue: "", //
tableData: [
{
id: "电表",
name: "位置1",
amount1: "编号1",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置2",
amount1: "编号2",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置3",
amount1: "编号3",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置4",
amount1: "编号4",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置5",
amount1: "编号5",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置6",
amount1: "编号6",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置7",
amount1: "编号7",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置8",
amount1: "编号8",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "空调系统用电总合计",
name: "位置9",
amount1: "编号9",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置10",
amount1: "编号10",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置11",
amount1: "编号11",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置12",
amount1: "编号12",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置13",
amount1: "编号13",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "热水热泵系统用电总合计",
name: "位置14",
amount1: "编号14",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "水表",
name: "位置15",
amount1: "编号15",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "水表",
name: "位置16",
amount1: "编号16",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "水表",
name: "位置17",
amount1: "编号17",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "水表",
name: "位置18",
amount1: "编号18",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "热水热泵系统用水总合计",
name: "位置19",
amount1: "编号19",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "燃气表(常用)",
name: "位置20",
amount1: "编号20",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "燃气表(备用)",
name: "位置21",
amount1: "编号21",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "蒸汽发生器+采暖用气总合计",
name: "位置22",
amount1: "编号22",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置23",
amount1: "编号23",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "蒸汽发生器+采暖用电总合计",
name: "位置24",
amount1: "编号24",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "电表",
name: "位置25",
amount1: "编号25",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "蒸汽发生器用水总合计",
name: "位置26",
amount1: "编号26",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
{
id: "水、电、气费用总合计(水/电/气价预估单价,单价需以实际缴费为准)",
name: "位置27",
amount1: "编号27",
amount2: "234.132",
amount3: 192.72,
amount4: 1,
amount5: 345,
amount6: 0.678,
amount7: 150,
},
],
tableData2: [
{
id: "流量计量表",
name: "中央空调冷冻流量",
amount1: "0",
amount2: "0",
amount3: 0,
amount4: "",
},
{
id: "3",
name: "中央空调冷却流量",
amount1: "0",
amount2: "0",
amount3: 0,
amount4: "",
},
{
id: "4",
name: "中央空调采暖流量",
amount1: "0",
amount2: "0",
amount3: 0,
amount4: "",
},
{
id: "1",
name: "蒸汽流量",
amount1: "0",
amount2: "0",
amount3: 0,
amount4: "",
},
],
};
},
created() {
//
const currentDate = new Date();
//
const year = currentDate.getFullYear();
// 0 1
const month = String(currentDate.getMonth() + 1).padStart(2, "0");
//
const day = String(currentDate.getDate()).padStart(2, "0");
// yyyy-MM-dd
this.dayValue = `${year}-${month}-${day}`;
this.monthValue = `${year}-${month}`;
},
mounted() {
this.getList();
},
methods: {
tableRowStyle({ row, column, rowIndex, columnIndex }) {
//
// if (columnIndex === 1) {
// return "color: #fd1e00;!important;text-align:center";
// }
// if (columnIndex === 2) {
// return "color: #3390ff;!important;text-align:center";
// }
if (
rowIndex === 8 ||
rowIndex === 13 ||
rowIndex === 18 ||
rowIndex === 21 ||
rowIndex === 23 ||
rowIndex === 25 ||
rowIndex === 26
) {
return "color: #75d148;!important;font-weight: bold;background-color: rgba(0, 71, 125, 0.4)";
}
},
// 1
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log("", row, column, rowIndex, columnIndex);
// // rowIndexx columnIndexy
// // rowIndex % 2 === 0
// if (rowIndex % 2 === 0) {
// // 0
// if (columnIndex === 0) {
// //
// return [1, 2];
// } else if (columnIndex === 1) {
// // [0, 0]
// return [0, 0];
// }
// }
if (
rowIndex === 8 ||
rowIndex === 13 ||
rowIndex === 18 ||
rowIndex === 21 ||
rowIndex === 23 ||
rowIndex === 25
) {
if (columnIndex === 0) {
// rowIndex 8 columnIndex 0 1 6
return [1, 6];
} else if (columnIndex < 6) {
// rowIndex 8 columnIndex 6
return [0, 0];
}
}
if (rowIndex === 26) {
if (columnIndex < 6) {
if (columnIndex === 0) {
//
return [1, 6];
} else {
//
return [0, 0];
}
} else if (columnIndex >= 6) {
if (columnIndex === 6) {
//
return [1, 3];
} else {
//
return [0, 0];
}
}
}
//
return [1, 1];
},
// 2
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex === 0) {
return {
rowspan: 4,
colspan: 1,
};
} else {
return {
rowspan: 0,
colspan: 0,
};
}
}
},
/** 查询表格数据 */
getList() {
this.loading = true;
if (!this.dayValue) {
this.$modal.msgWarning("请选择日期!");
return;
}
let data = {
todayTimestamp: `${this.dayValue} 00:00:00`,
};
meterReadingsList(data).then((res) => {
console.log("列表返回", res);
if (res.code == 200 && res.rows) {
this.tableData = res.rows.slice(0, 27);
this.tableData2 = res.rows.slice(27, 31);
} else {
this.tableData = [];
this.tableData2 = [];
}
});
//
this.loading = false;
//
this.getTemValue();
},
getTemValue() {
if (this.dayValue) {
//
const parts = this.dayValue.split("-");
this.monthValue = `${parts[0]}-${parts[1]}`;
}
this.queryParams.startTime = this.queryParams.endTime = this.monthValue;
console.log("参数", this.queryParams);
weatherTempData(this.queryParams).then((response) => {
let data = response.rows;
// console.log("this.dayValue", this.dayValue);
if (data && data.length > 0) {
data.forEach((item) => {
if (item.dateAndWeek) {
let objectDate = item.dateAndWeek.split(" ")[0];
// console.log(" objectDate", objectDate);
if (objectDate == this.dayValue) {
this.lowValue = item.minTemp;
this.heightValue = item.maxTemp;
console.log("最低气温", this.lowValue);
console.log("最高气温", this.heightValue);
}
}
});
}
});
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 导出按钮操作 */
handleExport() {
let data = {
todayTimestamp: this.dayValue,
};
console.log("导出数据参数", data);
meterReadingsExport(data).then((res) => {
console.log("导出返回", res);
if (res) {
//
// blob URL
const url = window.URL.createObjectURL(new Blob([res]));
// <a>hrefdownload
const link = document.createElement("a");
link.href = url;
link.setAttribute("download", "水电表抄表记录.xls"); //
//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
// blob URL
window.URL.revokeObjectURL(url);
this.$message({
type: "success",
message: "导出成功!",
});
} else {
this.$message.error("导出失败!");
}
});
// .catch((err) => {
// this.$message.error('!');
// })
},
},
};
</script>
<style scoped>
.app-container >>> .el-table th.el-table__cell.is-leaf,
.app-container >>> .el-table td.el-table__cell {
border-bottom: 1px solid #000000 !important;
}
.app-container >>> .el-table--border .el-table__cell {
border-right: 1px solid #000000 !important;
}
</style>
<style lang="scss" scoped>
.meter-Context {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
border: 1px solid #000000 !important;
padding: 0 30px;
.meter-li {
line-height: 23px;
padding: 10px 0;
height: 45px;
color: #ffffff;
font-size: 14px;
margin-right: 30px;
}
}
</style>
Loading…
Cancel
Save