Commit 140f5795 authored by 裴文涛's avatar 裴文涛
parents b69fb0bc c84a2ccb
......@@ -24,6 +24,7 @@
"mockjs": "^1.1.0",
"node-sass": "^9.0.0",
"public-ip": "^6.0.2",
"qs": "^6.13.0",
"virtual-list": "^1.0.1",
"vue": "^3.4.27",
"vue-router": "^4.3.0",
......
import axios from 'axios'
import store from '../store/index'
import qs from "qs";
//import { useRouter, useRoute } from 'vue-router'
import { useRouter } from "vue-router";
//import { ref } from 'vue'
......@@ -23,6 +24,7 @@ let ipAddress = axios.defaults.baseURL;
axios.interceptors.request.use((config) => {
config.baseURL = store.getters.getSERVEICE();
console.log(config.baseURL);
config.data = qs.stringify(config.data);
return config;
}, (error) => {
return Promise.reject(error);
......
......@@ -16,11 +16,19 @@ export const postInstantHeat = params => {
// 瞬时热量-新增修改
export const postInstantHeatUpdate = params => {
return http.post(`api/Scheduling/BizInstantaneousHeat/Update`).then(res => res).catch(function (error) {
return http.post(`api/Scheduling/BizInstantaneousHeat/Update`,params).then(res => res).catch(function (error) {
console.log(error);
})
}
// 参数设置
export const postConfigBoilerUpdate = params => {
return http.post(`api/configboiler/Save`,params).then(res => res).catch(function (error) {
console.log(error);
})
}
export const postSecAbsTUc = params => {
return http.post(`/api/analysis/external/SecAbsTUc`, params).then(res => res).catch(function (error) {
console.log(error);
......
This diff is collapsed.
......@@ -4,25 +4,20 @@
<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 style="width: 80%" v-model="formDatas.openingOfElectricValve">
<el-input style="width: 80%" v-model="formDatas.openingOfElectricValve">
<template #append>
<div style="width: 40px">%
</div>
</template>
</el-input>
<template #append>
<div style="width: 40px">%
</div>
</template>
</el-input>
</td>
</tr>
......@@ -35,11 +30,7 @@
<th style="width: 25%">换热站</th>
<td style="text-align: left">
<el-checkbox-group v-model="form.type" style="width: 60%;">
<el-checkbox
v-for="(option, index) in options"
:key="index"
:label="option"
>
<el-checkbox v-for="(option, index) in options" :key="index" :label="option">
{{ option }}
</el-checkbox>
</el-checkbox-group>
......@@ -55,9 +46,9 @@
<td style="text-align: left">
<el-input style="width: 80%" v-model="formDatas.boilerOutletWaterTemperature">
<template #append >
<template #append>
<div style="width: 40px;">
</div>
</template>
</el-input>
......@@ -76,7 +67,7 @@
<td style="text-align: left">
<el-form>
<el-input style="width: 80%" v-model="formDatas.holdingTime">
<template #append >
<template #append>
<div style="width: 40px">
分钟
</div>
......@@ -101,7 +92,7 @@
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="formDatas.upperLlimitMainFlow">
<template #append >
<template #append>
<div style="width: 40px;">
m3/h
</div>
......@@ -183,7 +174,7 @@
<th rowspan="3">
<div>
<div class="btngrounp">
<el-button type="primary" @click="save">保存</el-button>
<el-button type="primary" @click="onSave">保存</el-button>
<el-button type="primary" style="margin: 0 0 0 5px">关闭</el-button>
</div>
</div>
......@@ -200,37 +191,70 @@
</template>
<script setup>
import {ref, reactive, onMounted, onUnmounted, onBeforeMount} from "vue";
import { ref, reactive, onMounted, onUnmounted, onBeforeMount } from "vue";
import { postConfigBoilerUpdate } from '@/api/scheduling.js'
import http from '../../api/http';
const options = reactive(['瑞景园低区','瑞景园高区','翰锦园','圣美园低区','圣美园高区','社区服务中心','风雅园','风雅园_幼儿园','枫润园低区','枫润园高区']);
const options = reactive(['瑞景园低区', '瑞景园高区', '翰锦园', '圣美园低区', '圣美园高区', '社区服务中心', '风雅园', '风雅园_幼儿园', '枫润园低区', '枫润园高区']);
const form = ref({
types:[]
types: []
})
const formDatas = ref({
})
const listData = ()=>{
http.get("/api/configboiler/getData").then((result)=>{
formDatas.value=result.data;
console.log(formDatas.value)
console.log({...formDatas.value})
const formDatas = ref([
{
"updateNullFields": "updateNullFields",
"configId": "",
"openingOfElectricValve": "",
"boilerOutletWaterTemperature": "",
"holdingTime": "",
"upperLlimitMainFlow": "",
"lowerLlimitMainFlow": "",
"maxTargetTemperature": "",
"bestHoldingTime": "",
"transferIds": ""
}
])
const getListData = () => {
http.get("/api/configboiler/getData").then((result) => {
formDatas.value = result.data;
})
}
listData()
const save = ()=>{
console.log(formDatas.value)
http.post("/api/configboiler/Save",{...formDatas.value},false).then((result)=>{
}).catch((error)=>{
console.log(error)
const onSave = async () => {
await postConfigBoilerUpdate({...formDatas.value}).then((res) => {
if (res.success) {
ElMessage.success('修改成功')
getListData()
}
})
}
// const onSave = () => {
// http.post("api/configboiler/Save","`updateNullFields=formDatas.updateNullFields&configId=formDatas.configId&openingOfElectricValve=formDatas.openingOfElectricValve&boilerOutletWaterTemperature=formDatas.boilerOutletWaterTemperature&holdingTime=formDatas.holdingTime&upperLlimitMainFlow=formDatas.upperLlimitMainFlow&lowerLlimitMainFlow=formDatas.lowerLlimitMainFlow&maxTargetTemperature=formDatas.maxTargetTemperature&bestHoldingTime=formDatas.bestHoldingTime&transferIds=formDatas.transferIds`").then((result) => {
// if (result.success) {
// ElMessage.success('修改成功')
// getListData()
// }
// }).catch((error) => {
// console.log(error)
// })
// }
// const onSave = () => {
// http.post("api/configboiler/Save","formDatas.value").then((result) => {
// if (result.success) {
// ElMessage.success('修改成功')
// getListData()
// }
// }).catch((error) => {
// console.log(error)
// })
// }
onMounted(() => {
getListData()
})
</script>
<style lang="less" scoped>
......@@ -243,9 +267,11 @@ console.log(formDatas.value)
background-color: #ffffff;
overflow: auto;
}
table {
width: 100%;
}
table,
tr,
th,
......@@ -254,34 +280,40 @@ td {
margin: 0;
padding: 0;
}
table {
width: 100%;
}
table th {
background-color: #dfe8f6;
text-align: center;
padding: 5px 10px;
}
table td {
text-align: center;
background-color: #ffffff;
padding: 5px 10px;
}
.btngrounp {
width: 300px;
}
.gc td {
background-color: #a6ffa6;
}
.gc td:first-child {
background-color: #ffffff;
}
table.botList td {
width: 33%;
text-align: left;
font-weight: bolder;
}
</style>
\ No newline at end of file
......@@ -7,81 +7,80 @@
</div>
<table cellpadding="0" cellspacing="1">
<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="List.planName"></el-input>
</td>
</tr>
</table>
</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="List.diffPercentage"></el-input>
</td>
</tr>
</table>
</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="List.timeoutMin"></el-input>
</td>
</tr>
</table>
</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="List.tempRegulation"></el-input>
</td>
</tr>
</table>
</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%" type="textarea" rows="6"
v-model="List.description"></el-input>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="btngrounp">
<el-button type="primary" @click="onSave">保存</el-button>
<el-button type="primary" style="margin: 0 0 0 5px" @click="onCancel">关闭</el-button>
</div>
<table cellpadding="0" cellspacing="1">
<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="List.planName"></el-input>
</td>
</tr>
</table>
</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="List.diffPercentage"></el-input>
</td>
</tr>
</table>
</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="List.timeoutMin"></el-input>
</td>
</tr>
</table>
</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="List.tempRegulation"></el-input>
</td>
</tr>
</table>
</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%" type="textarea" rows="6" v-model="List.description"></el-input>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="btngrounp">
<el-button type="primary" @click="onSave">保存</el-button>
<el-button type="primary" style="margin: 0 0 0 5px" @click="onCancel">关闭</el-button>
</div>
</el-card>
</div>
......@@ -90,23 +89,23 @@
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted } from "vue";
import { postInstantHeat,postInstantHeatUpdate} from "@/api/scheduling"
import { postInstantHeat, postInstantHeatUpdate } from "@/api/scheduling"
import { toRaw } from "@vue/reactivity";
import { ElMessage } from "element-plus";
import http from "../../api/http";
const loading = ref(false)
const List=ref([
{
const List = ref([
{
"planId": "",
"planName":"",
"diffPercentage":"",
"timeoutMin":"",
"tempRegulation":"",
"description":"",
"isActive":''
}
"planName": "",
"diffPercentage": "",
"timeoutMin": "",
"tempRegulation": "",
"description": "",
"isActive": ''
}
])
......@@ -117,13 +116,13 @@ const getInstanceHeat = async () => {
List.value = data.data[0]
loading.value = false
}
const onSave = async() => {
const onSave = async () => {
// await postInstantHeatUpdate(List.value)
await http.post("/api/Scheduling/BizInstantaneousHeat/Update",{...List.value},false).then((result)=>{
}).catch((error)=>{
console.log(error)
})
await http.post("/api/Scheduling/BizInstantaneousHeat/Update", { ...List.value }, false).then((result) => {
}).catch((error) => {
console.log(error)
})
ElMessage.success('修改成功')
getInstanceHeat()
}
......
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