Commit 71843e84 authored by xuke's avatar xuke

输入格式整改

parent 4b0e0076
......@@ -2,22 +2,15 @@
<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">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
v-float-number
style="width: 80%; text-align: left"
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>
</template>
......@@ -36,25 +29,16 @@
{{ option.label }}
</el-checkbox>
</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">
{{ 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"
>
</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>
......@@ -65,11 +49,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
v-float-number
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>
</template>
......@@ -87,11 +67,7 @@
<tr>
<td style="text-align: left">
<el-form>
<el-input
v-float-number
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>
</template>
......@@ -109,11 +85,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
v-float-number
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>
</template>
......@@ -130,11 +102,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
v-float-number
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>
</template>
......@@ -150,11 +118,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
v-float-number
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>
</template>
......@@ -171,11 +135,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input
v-float-number
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>
</template>
......@@ -191,9 +151,7 @@
<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>
......@@ -205,16 +163,6 @@
</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';
import loading from "element-plus"
import { ElMessage } from "element-plus";
// const options = reactive(['瑞景园低区', '瑞景园高区', '翰锦园', '圣美园低区', '圣美园高区', '社区服务中心', '风雅园', '风雅园_幼儿园', '枫润园低区', '枫润园高区']);
=======
import { postConfigBoilerUpdate } from "@/api/scheduling.js";
import http from "../../api/http";
import { ElMessage } from "element-plus";
......@@ -223,28 +171,12 @@ 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: [],
});
const formDatas = ref([
{
<<<<<<< HEAD
"updateNullFields": "",
"configId": "",
"openingOfElectricValve": "",
"boilerOutletWaterTemperature": "",
"holdingTime": "",
"upperLlimitMainFlow": "",
"lowerLlimitMainFlow": "",
"maxTargetTemperature": "",
"bestHoldingTime": "",
"transferIds": ""
}
])
=======
updateNullFields: "",
configId: "",
openingOfElectricValve: "",
......@@ -257,102 +189,15 @@ const formDatas = ref([
transferIds: [],
},
]);
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
const getListData = () => {
const loading = ElLoading.service({
lock: true,
text: "获取数据中",
background: "rgba(0, 0, 0, 0.7)",
});
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 = ""
})
}
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.updateNullFields = "";
loading.close();
......@@ -360,10 +205,10 @@ onMounted(() => {
};
const onSave = async () => {
const loading = ElLoading.service({
lock: true,
text: "保存数据中",
background: "rgba(0, 0, 0, 0.7)",
});
lock: true,
text: "保存数据中",
background: "rgba(0, 0, 0, 0.7)",
});
formDatas.value.transferIds = formDatas.value.transferIds.join(",");
const result = await postConfigBoilerUpdate({ ...formDatas.value });
......@@ -401,13 +246,12 @@ function getSupplys() {
}
});
}
console.log(options);
console.log("组长遍历的options:", options);
}
onMounted(() => {
getListData();
getSupplys();
});
>>>>>>> cb391db409ead5a67bcf7174338731e2d06d5041
</script>
<style lang="less" scoped>
.contentBlock {
......@@ -422,6 +266,7 @@ onMounted(() => {
table {
width: 100%;
.el-input__inner {
text-align: left !important;
}
......
......@@ -7,6 +7,7 @@ import { postEnergyManage, postEnergyDel, postEnergyUpdate } from "@/api/schedul
import http from '../../api/http'
import loading from 'element-plus'
import store from '../../store'
import { vFloatNumber } from "@/utils/directives.js";
const { proxy } = getCurrentInstance()
const tableData = ref([{}])
const formEnergy = ref({
......@@ -15,7 +16,7 @@ const formEnergy = ref({
"energyType": "",
"record": "",
"recordDate": "",
"energyName":''
"energyName": ''
})
const energyForm = ref()
const dialogVisible = ref(false)
......@@ -138,11 +139,11 @@ const handleDelete = async (row) => {
type: 'warning',
confirmButtonClass: 'ExitConfirmButton'
})
const res = await http.get("api/energy/Delete",{params:{EnergyId:row.energyId}}, false)
if(res.success) {
const res = await http.get("api/energy/Delete", { params: { EnergyId: row.energyId } }, false)
if (res.success) {
ElMessage.success("删除成功")
getEnergyData()
}else {
} else {
ElMessage.error("删除失败")
}
}
......@@ -174,7 +175,7 @@ const handleEdit = (val) => {
dialogVisible.value = true
nextTick(() => {
Object.assign(formEnergy.value, { ...val })
console.log("val:",val);
console.log("val:", val);
// var newArr = []
// formEnergy.supplyId.map((item)=> {
// newArr.push(item[item.length-1])
......@@ -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();
let supplyIdOptions = reactive([])
getEnterprise();
......@@ -400,7 +401,7 @@ onMounted(() => {
<tr>
<td style="text-align: left;">
<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>
</td>
</tr>
......
......@@ -26,7 +26,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<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>
</tr>
</table>
......@@ -54,7 +54,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<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>
</tr>
</table>
......@@ -93,6 +93,7 @@ import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling"
import { toRaw } from "@vue/reactivity";
import { ElMessage } from "element-plus";
import http from "../../api/http";
import { vFloatNumber } from "@/utils/directives.js";
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