Commit 5e01974b authored by 裴文涛's avatar 裴文涛
parents 4c8a80c3 71843e84
...@@ -2,22 +2,15 @@ ...@@ -2,22 +2,15 @@
<div class="contentBlock"> <div class="contentBlock">
<div class="contentBlockInn"> <div class="contentBlockInn">
<el-card class="card-contianer"> <el-card class="card-contianer">
<table <table cellpadding="0" cellspacing="1" style="background-color: #99bbe8">
cellpadding="0"
cellspacing="1"
style="background-color: #99bbe8"
>
<tr> <tr>
<th style="width: 25%">电调阈开启度</th> <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"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input <el-input v-float-number style="width: 80%; text-align: left"
v-float-number v-model="formDatas.openingOfElectricValve">
style="width: 80%; text-align: left"
v-model="formDatas.openingOfElectricValve"
>
<template #append> <template #append>
<div style="width: 40px">%</div> <div style="width: 40px">%</div>
</template> </template>
...@@ -36,25 +29,16 @@ ...@@ -36,25 +29,16 @@
{{ option.label }} {{ option.label }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> --> </el-checkbox-group> -->
<<<<<<< HEAD <!-- <el-checkbox-group v-model="checkList" style="width: 60%;">
<el-checkbox-group v-model="checkList" style="width: 60%;">
<el-checkbox v-for="(option, index) in options" :key="index" :label="option" :value="option.value"> <el-checkbox v-for="(option, index) in options" :key="index" :label="option" :value="option.value">
{{ option.label }} {{ option.label }}
</el-checkbox> </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">
<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 }} {{ option.label }}
</el-checkbox> </el-checkbox>
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
</el-checkbox-group> </el-checkbox-group>
</td> </td>
</tr> </tr>
...@@ -65,11 +49,7 @@ ...@@ -65,11 +49,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input <el-input v-float-number style="width: 80%" v-model="formDatas.boilerOutletWaterTemperature">
v-float-number
style="width: 80%"
v-model="formDatas.boilerOutletWaterTemperature"
>
<template #append> <template #append>
<div style="width: 40px"></div> <div style="width: 40px"></div>
</template> </template>
...@@ -87,11 +67,7 @@ ...@@ -87,11 +67,7 @@
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-form> <el-form>
<el-input <el-input v-float-number style="width: 80%" v-model="formDatas.holdingTime">
v-float-number
style="width: 80%"
v-model="formDatas.holdingTime"
>
<template #append> <template #append>
<div style="width: 40px">分钟</div> <div style="width: 40px">分钟</div>
</template> </template>
...@@ -109,11 +85,7 @@ ...@@ -109,11 +85,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input <el-input v-float-number style="width: 80%" v-model="formDatas.upperLlimitMainFlow">
v-float-number
style="width: 80%"
v-model="formDatas.upperLlimitMainFlow"
>
<template #append> <template #append>
<div style="width: 40px">m3/h</div> <div style="width: 40px">m3/h</div>
</template> </template>
...@@ -130,11 +102,7 @@ ...@@ -130,11 +102,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input <el-input v-float-number style="width: 80%" v-model="formDatas.lowerLlimitMainFlow">
v-float-number
style="width: 80%"
v-model="formDatas.lowerLlimitMainFlow"
>
<template #append> <template #append>
<div style="width: 40px">m3/h</div> <div style="width: 40px">m3/h</div>
</template> </template>
...@@ -150,11 +118,7 @@ ...@@ -150,11 +118,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input <el-input v-float-number style="width: 80%" v-model="formDatas.maxTargetTemperature">
v-float-number
style="width: 80%"
v-model="formDatas.maxTargetTemperature"
>
<template #append> <template #append>
<div style="width: 40px"></div> <div style="width: 40px"></div>
</template> </template>
...@@ -171,11 +135,7 @@ ...@@ -171,11 +135,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input <el-input v-float-number style="width: 80%" v-model="formDatas.bestHoldingTime">
v-float-number
style="width: 80%"
v-model="formDatas.bestHoldingTime"
>
<template #append> <template #append>
<div style="width: 40px">分钟</div> <div style="width: 40px">分钟</div>
</template> </template>
...@@ -191,9 +151,7 @@ ...@@ -191,9 +151,7 @@
<div> <div>
<div class="btngrounp"> <div class="btngrounp">
<el-button type="primary" @click="onSave">保存</el-button> <el-button type="primary" @click="onSave">保存</el-button>
<el-button type="primary" style="margin: 0 0 0 5px" <el-button type="primary" style="margin: 0 0 0 5px">关闭</el-button>
>关闭</el-button
>
</div> </div>
</div> </div>
</th> </th>
...@@ -205,16 +163,6 @@ ...@@ -205,16 +163,6 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive, onMounted, onUnmounted, onBeforeMount } from "vue"; import { ref, reactive, onMounted, onUnmounted, onBeforeMount } from "vue";
<<<<<<< HEAD
import { postConfigBoilerUpdate } from '@/api/scheduling.js'
import store from "../../store";
import http from '../../api/http';
import loading from "element-plus"
import { ElMessage } from "element-plus";
// const options = reactive(['瑞景园低区', '瑞景园高区', '翰锦园', '圣美园低区', '圣美园高区', '社区服务中心', '风雅园', '风雅园_幼儿园', '枫润园低区', '枫润园高区']);
=======
import { postConfigBoilerUpdate } from "@/api/scheduling.js"; import { postConfigBoilerUpdate } from "@/api/scheduling.js";
import http from "../../api/http"; import http from "../../api/http";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
...@@ -223,28 +171,12 @@ import store from "../../store/index"; ...@@ -223,28 +171,12 @@ import store from "../../store/index";
import { vFloatNumber } from "@/utils/directives.js"; import { vFloatNumber } from "@/utils/directives.js";
import { load } from "@amap/amap-jsapi-loader"; import { load } from "@amap/amap-jsapi-loader";
import { ElLoading } from "element-plus"; import { ElLoading } from "element-plus";
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
const form = ref({ const form = ref({
types: [], types: [],
}); });
const formDatas = ref([ const formDatas = ref([
{ {
<<<<<<< HEAD
"updateNullFields": "",
"configId": "",
"openingOfElectricValve": "",
"boilerOutletWaterTemperature": "",
"holdingTime": "",
"upperLlimitMainFlow": "",
"lowerLlimitMainFlow": "",
"maxTargetTemperature": "",
"bestHoldingTime": "",
"transferIds": ""
}
])
=======
updateNullFields: "", updateNullFields: "",
configId: "", configId: "",
openingOfElectricValve: "", openingOfElectricValve: "",
...@@ -257,102 +189,15 @@ const formDatas = ref([ ...@@ -257,102 +189,15 @@ const formDatas = ref([
transferIds: [], transferIds: [],
}, },
]); ]);
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
const getListData = () => { const getListData = () => {
const loading = ElLoading.service({ const loading = ElLoading.service({
lock: true, lock: true,
text: "获取数据中", text: "获取数据中",
background: "rgba(0, 0, 0, 0.7)", background: "rgba(0, 0, 0, 0.7)",
}); });
http.get("/api/configboiler/getData").then((result) => { http.get("/api/configboiler/getData").then((result) => {
formDatas.value = result.data; formDatas.value = result.data;
<<<<<<< HEAD
formDatas.value.updateNullFields = ""
})
}
const onSave = async () => {
const result = await postConfigBoilerUpdate({ ...formDatas.value })
if (result.success) {
ElMessage.success('修改成功')
}
getListData()
}
// 获取换热站名称
const enterpriseId = ref();
let supplyIdOptions = reactive([])
getEnterprise();
function getEnterprise() {
var result = store.getters.getEnterprise();
if (result) {
enterpriseId.value = result[0].enterpriseId;
}
}
const PatrolInfo = reactive({
"Id": [],
"startTime": "",
"endTime": "",
"start": 0,
"count": 30,
"sort": ""
})
let options = reactive([]);
const option = reactive([]);
const getSupplys = () => {
loading.value = true;
options.length = 0;
PatrolInfo.Id.length = 0;
var result = store.getters.getEnterprise();
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 => {
chi.push({ value: unit.unitId, label: unit.unitName });
});
c.push({ children: chi, label: supply.supplyName, value: supply.supplyId });
});
options.push({ children: c, label: center.serviceCenterName });
})
} else {
element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => {
chi.push({ value: unit.unitId, label: unit.unitName });
})
options.push({ children: chi, label: element.supplyName });
})
}
}
});
console.log("options:", options[0].children[1].children);
console.log(options.length);
options = options[0].children[1].children
}
}
const checkList = ref(formDatas.transferIds)
// console.log(options);
// for (var i = 0; i < options.length; i++) {
// for (var j = 0; j < options[0].children[0].length; j++) {
// option.push(options[i].children[j].children)
// }
// }
// console.log("遍历后的option:", option);
onMounted(() => {
getListData()
getSupplys()
})
=======
formDatas.value.transferIds = formDatas.value.transferIds.split(","); formDatas.value.transferIds = formDatas.value.transferIds.split(",");
formDatas.value.updateNullFields = ""; formDatas.value.updateNullFields = "";
loading.close(); loading.close();
...@@ -363,7 +208,7 @@ const onSave = async () => { ...@@ -363,7 +208,7 @@ const onSave = async () => {
lock: true, lock: true,
text: "保存数据中", text: "保存数据中",
background: "rgba(0, 0, 0, 0.7)", background: "rgba(0, 0, 0, 0.7)",
}); });
formDatas.value.transferIds = formDatas.value.transferIds.join(","); formDatas.value.transferIds = formDatas.value.transferIds.join(",");
const result = await postConfigBoilerUpdate({ ...formDatas.value }); const result = await postConfigBoilerUpdate({ ...formDatas.value });
...@@ -401,13 +246,12 @@ function getSupplys() { ...@@ -401,13 +246,12 @@ function getSupplys() {
} }
}); });
} }
console.log(options); console.log("组长遍历的options:", options);
} }
onMounted(() => { onMounted(() => {
getListData(); getListData();
getSupplys(); getSupplys();
}); });
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.contentBlock { .contentBlock {
...@@ -422,6 +266,7 @@ onMounted(() => { ...@@ -422,6 +266,7 @@ onMounted(() => {
table { table {
width: 100%; width: 100%;
.el-input__inner { .el-input__inner {
text-align: left !important; text-align: left !important;
} }
......
...@@ -7,6 +7,7 @@ import { postEnergyManage, postEnergyDel, postEnergyUpdate } from "@/api/schedul ...@@ -7,6 +7,7 @@ import { postEnergyManage, postEnergyDel, postEnergyUpdate } from "@/api/schedul
import http from '../../api/http' import http from '../../api/http'
import loading from 'element-plus' import loading from 'element-plus'
import store from '../../store' import store from '../../store'
import { vFloatNumber } from "@/utils/directives.js";
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const tableData = ref([{}]) const tableData = ref([{}])
const formEnergy = ref({ const formEnergy = ref({
...@@ -15,7 +16,7 @@ const formEnergy = ref({ ...@@ -15,7 +16,7 @@ const formEnergy = ref({
"energyType": "", "energyType": "",
"record": "", "record": "",
"recordDate": "", "recordDate": "",
"energyName":'' "energyName": ''
}) })
const energyForm = ref() const energyForm = ref()
const dialogVisible = ref(false) const dialogVisible = ref(false)
...@@ -138,11 +139,11 @@ const handleDelete = async (row) => { ...@@ -138,11 +139,11 @@ const handleDelete = async (row) => {
type: 'warning', type: 'warning',
confirmButtonClass: 'ExitConfirmButton' confirmButtonClass: 'ExitConfirmButton'
}) })
const res = await http.get("api/energy/Delete",{params:{EnergyId:row.energyId}}, false) const res = await http.get("api/energy/Delete", { params: { EnergyId: row.energyId } }, false)
if(res.success) { if (res.success) {
ElMessage.success("删除成功") ElMessage.success("删除成功")
getEnergyData() getEnergyData()
}else { } else {
ElMessage.error("删除失败") ElMessage.error("删除失败")
} }
} }
...@@ -174,7 +175,7 @@ const handleEdit = (val) => { ...@@ -174,7 +175,7 @@ const handleEdit = (val) => {
dialogVisible.value = true dialogVisible.value = true
nextTick(() => { nextTick(() => {
Object.assign(formEnergy.value, { ...val }) Object.assign(formEnergy.value, { ...val })
console.log("val:",val); console.log("val:", val);
// var newArr = [] // var newArr = []
// formEnergy.supplyId.map((item)=> { // formEnergy.supplyId.map((item)=> {
// newArr.push(item[item.length-1]) // newArr.push(item[item.length-1])
...@@ -220,7 +221,7 @@ const onSubmit = () => { ...@@ -220,7 +221,7 @@ const onSubmit = () => {
} }
}) })
} }
const props = { multiple: false, emitPath: false,checkStrictly: true } const props = { multiple: false, emitPath: false, checkStrictly: true }
const enterpriseId = ref(); const enterpriseId = ref();
let supplyIdOptions = reactive([]) let supplyIdOptions = reactive([])
getEnterprise(); getEnterprise();
...@@ -400,7 +401,7 @@ onMounted(() => { ...@@ -400,7 +401,7 @@ onMounted(() => {
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<el-form-item prop="record" style="margin: 0;padding: 0;width: 100%;"> <el-form-item prop="record" style="margin: 0;padding: 0;width: 100%;">
<el-input v-model="formEnergy.record" placeholder="请输入能源用度" /> <el-input v-float-number v-model="formEnergy.record" placeholder="请输入能源用度" />
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input style="width: 80%" v-model="List.diffPercentage"></el-input> <el-input v-float-number style="width: 80%" v-model="List.diffPercentage"></el-input>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-input style="width: 80%" v-model="List.tempRegulation"></el-input> <el-input v-float-number style="width: 80%" v-model="List.tempRegulation"></el-input>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -93,6 +93,7 @@ import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling" ...@@ -93,6 +93,7 @@ import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling"
import { toRaw } from "@vue/reactivity"; import { toRaw } from "@vue/reactivity";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import http from "../../api/http"; import http from "../../api/http";
import { vFloatNumber } from "@/utils/directives.js";
const loading = ref(false) const loading = ref(false)
......
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