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