Commit 4b0e0076 authored by xuke's avatar xuke

能源消耗

parents b9fe630b cb391db4
*{
box-sizing:border-box;
-moz-box-sizing:border-box; /* Firefox */
-webkit-box-sizing:border-box; /* Safari */
* {
box-sizing: border-box;
-moz-box-sizing: border-box; /* Firefox */
-webkit-box-sizing: border-box; /* Safari */
}
.el-pager li{
.el-pager li {
font-weight: 100;
margin-right: 9px;
border: 1px solid #eee;
border-radius: 3px;
min-width: 28px;
}
.el-pager li.active,.el-pager li:hover{
.el-pager li.active,
.el-pager li:hover {
background: #ed4014;
color: white;
}
.el-pagination__editor.el-input .el-input__inner{
.el-pagination__editor.el-input .el-input__inner {
height: 23px;
}
.animated {
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
}
@media (print), (prefers-reduced-motion) {
@media (print), (prefers-reduced-motion) {
.animated {
-webkit-animation: unset !important;
animation: unset !important;
-webkit-transition: none !important;
transition: none !important;
}
}
}
@-webkit-keyframes fadeInDown {
@-webkit-keyframes fadeInDown {
from {
opacity: 1;
-webkit-transform: translate3d(0, -100%, 0);
......@@ -47,9 +47,9 @@
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
}
@keyframes fadeInDown {
@keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
......@@ -61,15 +61,15 @@
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
}
.fadeInDown {
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
.ivu-message{
}
.ivu-message {
z-index: 999999999 !important;
}
.ivu-form-item-content{
}
.ivu-form-item-content {
text-align: left;
}
\ No newline at end of file
}
//只允许输入整数
export const integerOnly = {
beforeMount(el) {
el.addEventListener('input', event => {
// 获取输入框的当前值
let value = event.target.value;
// 使用正则表达式来匹配非整数字符,替换为空字符串
value = value.replace(/[^0-9]/g, '');
// 如果值变化了,更新输入框的值
if (value !== event.target.value) {
event.target.value = value;
}
});
}
};
// 只允许输入浮点数
export const vFloatNumber = {
beforeMount(el) {
el.addEventListener('input', (e) => {
e.target.value = e.target.value.replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/\.{2,}/g, '.').replace(/^(\d+)\./g, '$1.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.');
e.target.value = e.target.value.replace(/^(\d+)\./g, '$1.').replace(/^0+(?=[1-9])/, '');
if (e.target.value.split('.').length > 2) {
e.target.value = e.target.value.replace('.', '$#$').split('.').map(part => part.replace(/\d/g, '')).join('.').replace('$#$', '.').substring(0, e.target.value.length - 1);
}
});
}
};
\ No newline at end of file
<template>
<div class="contentBlock">
<div class="contentBlockInn">
<el-card class="card-contianer">
<table cellpadding="0" cellspacing="1" style="background-color: #99bbe8">
<table
cellpadding="0"
cellspacing="1"
style="background-color: #99bbe8"
>
<tr>
<th style="width: 25%">电调阈开启度</th>
<td style="width: 60%; margin:0; padding: 0">
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="formDatas.openingOfElectricValve">
<el-input
v-float-number
style="width: 80%; text-align: left"
v-model="formDatas.openingOfElectricValve"
>
<template #append>
<div style="width: 40px">%
</div>
<div style="width: 40px">%</div>
</template>
</el-input>
</td>
......@@ -30,11 +36,25 @@
{{ option.label }}
</el-checkbox>
</el-checkbox-group> -->
<<<<<<< HEAD
<el-checkbox-group v-model="checkList" style="width: 60%;">
<el-checkbox v-for="(option, index) in options" :key="index" :label="option" :value="option.value">
{{ option.label }}
</el-checkbox>
=======
<el-checkbox-group
v-model="formDatas.transferIds"
style="width: 60%"
>
<el-checkbox
v-for="(option, index) in options"
:label="option.value"
:key="index"
>
{{ option.label }}
</el-checkbox>
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
</el-checkbox-group>
</td>
</tr>
......@@ -45,11 +65,13 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="formDatas.boilerOutletWaterTemperature">
<el-input
v-float-number
style="width: 80%"
v-model="formDatas.boilerOutletWaterTemperature"
>
<template #append>
<div style="width: 40px;">
</div>
<div style="width: 40px"></div>
</template>
</el-input>
</td>
......@@ -58,7 +80,6 @@
</td>
</tr>
<tr>
<th style="width: 25%">电调阈开启度保持时间</th>
<td style="width: 60%; margin: 0; padding: 0">
......@@ -66,11 +87,13 @@
<tr>
<td style="text-align: left">
<el-form>
<el-input style="width: 80%" v-model="formDatas.holdingTime">
<el-input
v-float-number
style="width: 80%"
v-model="formDatas.holdingTime"
>
<template #append>
<div style="width: 40px">
分钟
</div>
<div style="width: 40px">分钟</div>
</template>
</el-input>
</el-form>
......@@ -80,18 +103,19 @@
</td>
</tr>
<tr>
<th style="width: 25%">锅炉房供水总管流量上限值</th>
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="formDatas.upperLlimitMainFlow">
<el-input
v-float-number
style="width: 80%"
v-model="formDatas.upperLlimitMainFlow"
>
<template #append>
<div style="width: 40px;">
m3/h
</div>
<div style="width: 40px">m3/h</div>
</template>
</el-input>
</td>
......@@ -106,11 +130,13 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="formDatas.lowerLlimitMainFlow">
<el-input
v-float-number
style="width: 80%"
v-model="formDatas.lowerLlimitMainFlow"
>
<template #append>
<div style="width: 40px">
m3/h
</div>
<div style="width: 40px">m3/h</div>
</template>
</el-input>
</td>
......@@ -124,11 +150,13 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="formDatas.maxTargetTemperature">
<el-input
v-float-number
style="width: 80%"
v-model="formDatas.maxTargetTemperature"
>
<template #append>
<div style="width: 40px;">
</div>
<div style="width: 40px"></div>
</template>
</el-input>
</td>
......@@ -137,25 +165,25 @@
</td>
</tr>
<tr>
<th style="width: 25%">总管流量上下限范围内持续时间</th>
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="formDatas.bestHoldingTime">
<el-input
v-float-number
style="width: 80%"
v-model="formDatas.bestHoldingTime"
>
<template #append>
<div style="width: 40px">
分钟
</div>
<div style="width: 40px">分钟</div>
</template>
</el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th></th>
......@@ -163,7 +191,9 @@
<div>
<div class="btngrounp">
<el-button type="primary" @click="onSave">保存</el-button>
<el-button type="primary" style="margin: 0 0 0 5px">关闭</el-button>
<el-button type="primary" style="margin: 0 0 0 5px"
>关闭</el-button
>
</div>
</div>
</th>
......@@ -172,14 +202,10 @@
</el-card>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, onBeforeMount } from "vue";
<<<<<<< HEAD
import { postConfigBoilerUpdate } from '@/api/scheduling.js'
import store from "../../store";
import http from '../../api/http';
......@@ -188,11 +214,23 @@ import { ElMessage } from "element-plus";
// const options = reactive(['瑞景园低区', '瑞景园高区', '翰锦园', '圣美园低区', '圣美园高区', '社区服务中心', '风雅园', '风雅园_幼儿园', '枫润园低区', '枫润园高区']);
=======
import { postConfigBoilerUpdate } from "@/api/scheduling.js";
import http from "../../api/http";
import { ElMessage } from "element-plus";
const options = reactive([]);
import store from "../../store/index";
import { vFloatNumber } from "@/utils/directives.js";
import { load } from "@amap/amap-jsapi-loader";
import { ElLoading } from "element-plus";
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
const form = ref({
types: []
})
types: [],
});
const formDatas = ref([
{
<<<<<<< HEAD
"updateNullFields": "",
"configId": "",
"openingOfElectricValve": "",
......@@ -206,9 +244,30 @@ const formDatas = ref([
}
])
=======
updateNullFields: "",
configId: "",
openingOfElectricValve: "",
boilerOutletWaterTemperature: "",
holdingTime: "",
upperLlimitMainFlow: "",
lowerLlimitMainFlow: "",
maxTargetTemperature: "",
bestHoldingTime: "",
transferIds: [],
},
]);
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
const getListData = () => {
const loading = ElLoading.service({
lock: true,
text: "获取数据中",
background: "rgba(0, 0, 0, 0.7)",
});
http.get("/api/configboiler/getData").then((result) => {
formDatas.value = result.data;
<<<<<<< HEAD
formDatas.value.updateNullFields = ""
})
}
......@@ -293,6 +352,62 @@ onMounted(() => {
getSupplys()
})
=======
formDatas.value.transferIds = formDatas.value.transferIds.split(",");
formDatas.value.updateNullFields = "";
loading.close();
});
};
const onSave = async () => {
const loading = ElLoading.service({
lock: true,
text: "保存数据中",
background: "rgba(0, 0, 0, 0.7)",
});
formDatas.value.transferIds = formDatas.value.transferIds.join(",");
const result = await postConfigBoilerUpdate({ ...formDatas.value });
if (result.success) {
getListData();
loading.close();
ElMessage.success("修改成功");
}
};
//获取换热机组列表
function getSupplys() {
options.length = 0;
var result = store.getters.getEnterprise();
console.log(result);
if (result) {
result.forEach((element) => {
// if (element.enterpriseId === enterpriseId.value) {
if (
element.enterpriseId ===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()
) {
element.serviceCenterList.forEach((center) => {
let c = [];
center.supplyList.forEach((supply) => {
let chi = [];
supply.transferList.forEach((unit) => {
options.push({ value: unit.unitId, label: unit.unitName });
});
// c.push({ children: chi, label: supply.supplyName });
});
// options.push({ children: c, label: center.serviceCenterName });
});
}
});
}
console.log(options);
}
onMounted(() => {
getListData();
getSupplys();
});
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
</script>
<style lang="less" scoped>
.contentBlock {
......@@ -307,6 +422,9 @@ onMounted(() => {
table {
width: 100%;
.el-input__inner {
text-align: left !important;
}
}
table,
......@@ -336,8 +454,6 @@ table td {
.btngrounp {
width: 300px;
}
.gc td {
......
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