Commit aaf4cfbb authored by 裴文涛's avatar 裴文涛
parents 4ea227f5 95a1666f
...@@ -23,12 +23,12 @@ const count = 100 ...@@ -23,12 +23,12 @@ const count = 100
for (let i = 0; i < count; i++) { for (let i = 0; i < count; i++) {
List.push( List.push(
Mock.mock({ Mock.mock({
id: "@increment()", allowPagingId: "@increment()",
'name|1': Mock.mock(['东部供热站', '行政区供热站', '福宛里供热站']), 'supplyName|1': Mock.mock(['东部供热站', '行政区供热站', '福宛里供热站']),
'type|1-4': 1, 'energyType|1-4': 1,
'type|1': Mock.mock(['热', '光', '电','机械']), 'energyType|1': Mock.mock(['热', '光', '电','机械']),
'used|100-3000': 1, 'record|100-3000': 1,
date: Mock.mock('@date("yyyy/MM/dd")') + ' 0:00:00' recordDate: Mock.mock('@date("yyyy/MM/dd")') + ' 0:00:00'
}) })
) )
} }
...@@ -43,11 +43,11 @@ export default { ...@@ -43,11 +43,11 @@ export default {
*/ */
getEnergyList: config => { getEnergyList: config => {
//limit默认是10,因为分页器默认也是一页10个 //limit默认是10,因为分页器默认也是一页10个
const { name, page = 1, limit = 10 } = param2Obj(config.url) const { supplyName, page = 1, limit = 10 } = param2Obj(config.url)
const mockList = List.filter(energy => { const mockList = List.filter(energy => {
//如果name存在会,根据name筛选数据 //如果name存在会,根据name筛选数据
if (name && energy.name.indexOf(name) === -1) return false if (supplyName && energy.supplyName.indexOf(supplyName) === -1) return false
return true return true
}) })
//分页 //分页
...@@ -66,17 +66,17 @@ export default { ...@@ -66,17 +66,17 @@ export default {
* @return {*} * @return {*}
*/ */
deleteEnergy: config => { deleteEnergy: config => {
const { id } = param2Obj(config.url) const { allowPagingId} = param2Obj(config.url)
// console.log("前端传来的id:"+id); // console.log("前端传来的id:"+id);
if (!id) { if (!allowPagingId) {
return { return {
code: -999, code: -999,
message: '参数不正确' message: '参数不正确'
} }
} else { } else {
List = List.filter(item => item.id != id) List = List.filter(item => item.allowPagingId != allowPagingId)
console.log(List); console.log(List);
return { return {
code: 200, code: 200,
...@@ -91,14 +91,14 @@ export default { ...@@ -91,14 +91,14 @@ export default {
* @return {{code: number, data: {message: string}}} * @return {{code: number, data: {message: string}}}
*/ */
createEnery: config => { createEnery: config => {
const { name, type, used, date } = JSON.parse(config.body) const { supplyName, energyType, record, recordDate } = JSON.parse(config.body)
List.unshift({ List.unshift({
id:Mock.mock('@increment()'), allowPagingId:Mock.mock('@increment()'),
name:name, supplyName:supplyName,
type:type, energyType:energyType,
used:used, record:record,
date:date recordDate:recordDate
}) })
return { return {
code: 200, code: 200,
...@@ -109,14 +109,14 @@ export default { ...@@ -109,14 +109,14 @@ export default {
}, },
updateEnergy: config => { updateEnergy: config => {
const { id, name, type, used, date } = JSON.parse(config.body) const { allowPagingId, supplyName, energyType, record, recordDate } = JSON.parse(config.body)
const type_num = parseInt(type) const energyType_num = parseInt(energyType)
List.some(e => { List.some(e => {
if (e.id === id) { if (e.allowPagingId === allowPagingId) {
e.name = name e.supplyName = supplyName
e.type = type e.energyType = energyType
e.used = used e.record = record
e.date = date e.recordDate = recordDate
return true return true
} }
}) })
......
import http from './http' import http from './http'
//能源消耗 //能源消耗
export const postEnergyManage = params => { export const postEnergyManage = params => {
return http.post(`/api/manage/sheduling/EnergyManage`, params).then(res => res).catch(function (error) { return http.post(`/api/energy/getData`, params).then(res => res).catch(function (error) {
console.log(error); console.log(error);
}) })
} }
// 瞬时热量-获取列表
export const postInstantHeat = params => {
return http.post(`api/Scheduling/BizInstantaneousHeat/Get`).then(res => res).catch(function (error) {
console.log(error);
})
}
// 瞬时热量-新增修改
export const postInstantHeatUpdate = params => {
return http.post(`api/Scheduling/BizInstantaneousHeat/Update`).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);
})
}
export const postEnergyManageSave = params => {
return http.post(`/api/energy/Save`, params).then(res => res).catch(function (error) {
console.log(error);
})
}
export const getWeatherMagData = () => { // 获取气象干预数据 export const getWeatherMagData = () => { // 获取气象干预数据
return http.get(`/api/cusweather/getData`) return http.get(`/api/cusweather/getData`)
} }
...@@ -34,3 +63,4 @@ export const deleteAnnualParam = params =>{ // 删除年度参数 ...@@ -34,3 +63,4 @@ export const deleteAnnualParam = params =>{ // 删除年度参数
// console.log("地址:",`/api/Scheduling/BizHeatSet/Delete?Id=${params}`) // console.log("地址:",`/api/Scheduling/BizHeatSet/Delete?Id=${params}`)
return http.post(`/api/Scheduling/BizHeatSet/Delete?Id=${params}`) return http.post(`/api/Scheduling/BizHeatSet/Delete?Id=${params}`)
} }
...@@ -23,8 +23,8 @@ import http from './api/http' ...@@ -23,8 +23,8 @@ import http from './api/http'
import store from './store' import store from './store'
import $ from 'jquery' import $ from 'jquery'
// import {WebControl} from '@/assets/script/video/web-control.esm.min.js' // import {WebControl} from '@/assets/script/video/web-control.esm.min.js'
import "@/api/mock.js" // import "@/api/mock.js"
import api from '@/api/api' // import api from '@/api/api'
const app = createApp(App) const app = createApp(App)
...@@ -36,7 +36,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) { ...@@ -36,7 +36,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component('Notification', Notification) app.component('Notification', Notification)
app.config.globalProperties.http = http; app.config.globalProperties.http = http;
app.config.globalProperties.$api = api; // app.config.globalProperties.$api = api;
//将element-plus注册成全局可用组件库 //将element-plus注册成全局可用组件库
app.use(store) app.use(store)
.use(ElementPlus) .use(ElementPlus)
......
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
justify-content: center; justify-content: center;
} }
.span-text {} // .span-text {}
</style> </style>
<script setup> <script setup>
......
<template>
生产与结算数据分析表
</template>
\ No newline at end of file
<template>
年度参数管理
</template>
\ No newline at end of file
<template>
锅炉参数配置
</template>
\ No newline at end of file
<template>
能源消耗
</template>
\ No newline at end of file
<template>
瞬时热量对比配置
</template>
\ No newline at end of file
<template>
天气工况
</template>
\ No newline at end of file
<template>
气象干预
</template>
\ No newline at end of file
<script setup>
import {computed, isRef, ref, shallowRef} from "vue";
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import ReviseWindow from "./weatherManageSub/ReviseWindow.vue";
import BindWindow from "./weatherManageSub/BindWindow.vue";
const data = ref([
{
id: 1,
customName: '非节能(行政区)', // 自定义名称
heatingStationName: '行政区供热站', // 供热站名称
operateTime: '2024-03-19 21:33:50', // 操作时间
interventionMode: '气象仪模式', // 干预模式
temperature: 15.5, // 温度
windSpeed: 0, // 风速
illumination: 0, // 光照
switching: '手动模式', // 手自动切换
deviationPercentage: 10,// 自动偏差百分比
verifyTime: '20', // 验证时间
adjustTemperature: 1, // 调节温度
sort: 1 // 排序
},
{
id: 2,
customName: '非节能(行政区)', // 自定义名称
heatingStationName: '行政区供热站', // 供热站名称
operateTime: '2024-03-19 21:33:50', // 操作时间
interventionMode: '气象仪模式', // 干预模式
temperature: 15.5, // 温度
windSpeed: 0, // 风速
illumination: 0, // 光照
switching: '手动模式', // 手自动切换
deviationPercentage: 10,// 自动偏差百分比
verifyTime: '20', // 验证时间
adjustTemperature: 1, // 调节温度
sort: 2 // 排序
},
{
id: 3,
customName: '非节能(行政区)', // 自定义名称
heatingStationName: '行政区供热站', // 供热站名称
operateTime: '2024-03-19 21:33:50', // 操作时间
interventionMode: '气象仪模式', // 干预模式
temperature: 15.5, // 温度
windSpeed: 0, // 风速
illumination: 0, // 光照
switching: '手动模式', // 手自动切换
deviationPercentage: 10,// 自动偏差百分比
verifyTime: '20', // 验证时间
adjustTemperature: 1, // 调节温度
sort: 3 // 排序
},
{
id: 4,
customName: '非节能(行政区)', // 自定义名称
heatingStationName: '行政区供热站', // 供热站名称
operateTime: '2024-03-19 21:33:50', // 操作时间
interventionMode: '气象仪模式', // 干预模式
temperature: 15.5, // 温度
windSpeed: 0, // 风速
illumination: 0, // 光照
switching: '手动模式', // 手自动切换
deviationPercentage: 10,// 自动偏差百分比
verifyTime: '20', // 验证时间
adjustTemperature: 1, // 调节温度
sort: 4 // 排序
}
])
const currentPage = ref(1) // 当前页码
const pageSize = ref(30) // 每页显示条数
const reviseWindowOpen = ref(false) // 修改按钮弹窗状态
const bindWindowOpen = ref(false) // 绑定按钮弹窗状态
const totalPageCount = computed(() => { // 页面左下角总页数计算
return Math.ceil(data.value.length / pageSize.value)
})
const dependentSub = ref({}) // 弹窗数据
const tableHeaderClass = data => { // 表头样式
return 'table-header-class'
}
const tableBodyClass = data => { // 表体样式
return 'table-body-class'
}
const setCellStyle = (row, column, rowIndex, columnIndex) => {
let css_color = {}
css_color['padding-left'] = '0px'
css_color['padding-right'] = '0px'
css_color['padding-top'] = '3px'
css_color['padding-bottom'] = '3px'
return css_color
}
const revise = (row) => { // 修改按钮单击事件
dependentSub.value = row
reviseWindowOpen.value = true
}
const bind = (row) => { // 绑定按钮单击事件
dependentSub.value = row
bindWindowOpen.value = true
}
const confirmRevise = val => { // 修改弹窗确认按钮事件
for (let i = 0; i < data.value.length; i++) {
if (data.value[i].id === val.id) {
data.value[i].customName = val.customName
data.value[i].interventionMode = val.interventionMode
data.value[i].temperature = val.temperature
data.value[i].windSpeed = val.windSpeed
data.value[i].illumination = val.illumination
data.value[i].switching = val.switching
data.value[i].deviationPercentage = val.deviationPercentage
data.value[i].verifyTime = val.verifyTime
data.value[i].adjustTemperature = val.adjustTemperature
data.value[i].sort = val.sort
break
}
}
reviseWindowOpen.value = false
}
const confirmBind = val =>{
console.log("处理换热站绑定")
bindWindowOpen.value = false
}
</script>
<template>
<div class="container">
<div class="table-wrapper">
<el-table
:data="data"
stripe
border
style="width: 100%"
:cell-style="setCellStyle"
:header-cell-class-name="tableHeaderClass"
:row-class-name="tableBodyClass">
<el-table-column label="序号" type="index" align="center" width="60"/>
<el-table-column prop="customName" label="自定义名称" width="200"/>
<el-table-column prop="heatingStationName" label="供热站名称" width="160"/>
<el-table-column prop="operateTime" label="操作时间" width="210"/>
<el-table-column prop="interventionMode" label="干预模式" width="120"/>
<el-table-column prop="temperature" label="温度" width="60"/>
<el-table-column prop="windSpeed" label="风速" width="60"/>
<el-table-column prop="illumination" label="光照" width="60"/>
<el-table-column prop="switching" label="手自动切换" width="120"/>
<el-table-column prop="deviationPercentage" label="自动偏差百分比"/>
<el-table-column prop="verifyTime" label="验证时间"/>
<el-table-column prop="adjustTemperature" label="调节温度"/>
<el-table-column prop="sort" label="排序" width="60"/>
<el-table-column label="操作" width="200">
<template #default="scope">
<div class="table-operate-column">
<el-button link @click="revise(scope.row)" type="primary">修改</el-button>
<el-button link @click="bind(scope.row)" type="primary">绑定换热站</el-button>
<el-button link type="primary">详情</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination-wrapper">
<div class="pagination-text-area">
<div class="pagination-text">
共{{ data.length }}条记录,当前为第{{ currentPage }}页,共{{ totalPageCount }}页
</div>
</div>
<el-config-provider :locale="zhCn">
<el-pagination
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[30, 40, 50, 100, 200, 300]"
:small="true"
layout="sizes, prev, pager, next, jumper"
:total="data.length"
@change="data"
class="pagination"/>
</el-config-provider>
</div>
<div class="dialog-wrapper">
<ReviseWindow
:open="reviseWindowOpen"
:data="dependentSub"
@onCancel="reviseWindowOpen = false"
@onConfirm="confirmRevise"
></ReviseWindow>
<BindWindow
:open="bindWindowOpen"
:data="dependentSub"
@onCancel="bindWindowOpen = false"
@onConfirm="confirmBind"></BindWindow>
</div>
</div>
</template>
<style scoped>
:deep(.table-header-class) {
text-align: center;
background-color: #c4d8f1 !important;
color: #124c6a;
font-weight: normal;
}
:deep(.table-body-class) {
color: black;
}
.table-operate-column {
display: flex;
justify-content: center;
align-items: center;
}
.table-operate-column .el-button {
color: #124c6a;
font-size: 12px;
}
.pagination-wrapper {
padding: 10px;
display: flex;
justify-content: space-between;
align-items: center;
}
.pagination-text {
font-size: 12px;
}
.pagination {
}
::v-deep .el-table__body tr:hover>td {
background: linear-gradient(to top, rgb(0, 198, 255), rgb(255, 255, 255)) !important;
}
</style>
\ No newline at end of file
<template>
风力配置管理
</template>
\ No newline at end of file
...@@ -159,8 +159,6 @@ ...@@ -159,8 +159,6 @@
</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">
...@@ -185,19 +183,15 @@ ...@@ -185,19 +183,15 @@
<th rowspan="3"> <th rowspan="3">
<div> <div>
<div class="btngrounp"> <div class="btngrounp">
<el-button type="primary">保存</el-button> <el-button type="primary" @click="save">保存</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>
</th> </th>
</tr> </tr>
</table> </table>
</el-card> </el-card>
</div> </div>
</div> </div>
...@@ -221,12 +215,20 @@ const formDatas = ref({ ...@@ -221,12 +215,20 @@ const formDatas = ref({
const listData = ()=>{ const listData = ()=>{
http.get("/api/configboiler/getData").then((result)=>{ http.get("/api/configboiler/getData").then((result)=>{
formDatas.value=result.data; formDatas.value=result.data;
console.log('***********&&&&&&&&&&&&')
console.log(formDatas.value) console.log(formDatas.value)
console.log({...formDatas.value})
}) })
} }
listData() listData()
const save = ()=>{
console.log(formDatas.value)
http.post("/api/configboiler/Save",{...formDatas.value},false).then((result)=>{
}).catch((error)=>{
console.log(error)
})
}
......
...@@ -3,42 +3,51 @@ import { ref, onMounted, getCurrentInstance, reactive, nextTick } from 'vue' ...@@ -3,42 +3,51 @@ import { ref, onMounted, getCurrentInstance, reactive, nextTick } from 'vue'
import { ElMessageBox, ElMessage } from 'element-plus' import { ElMessageBox, ElMessage } from 'element-plus'
import axios from 'axios' import axios from 'axios'
import { Search, Document } from "@element-plus/icons-vue" import { Search, Document } from "@element-plus/icons-vue"
import {postEnergyManage,postSecAbsTUc,postEnergyManageSave} from "@/api/scheduling"
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const tableData = ref([]) const tableData = ref([])
const formEnergy = reactive({})
const dialogVisible = ref(false) const dialogVisible = ref(false)
const getEnergyData = async () => { const getEnergyData = async () => {
const data = await proxy.$api.getEnergyData(config) // const data = await proxy.$api.getEnergyData(config)
// console.log(data); // const data = await postSecAbsTUc(config)
tableData.value = data.list.map(item => ({ // const data = await postEnergyManage(config)
...item // const data = await postEnergyManageSave(formEnergy.value)
}))
console.log(data);
tableData.value = data.list
// .map(item => ({
// ...item,
// }))
config.total = data.count config.total = data.count
} }
const tableLabel = reactive([ const tableLabel = reactive([
{ {
prop: 'id', prop: 'allowPagingId',
label: "序号", label: "序号",
width: 100 width: 100
}, },
{ {
prop: 'name', prop: 'supplyName',
label: '名称', label: '名称',
width: 200 width: 200
}, },
{ {
prop: 'type', prop: 'energyType',
label: "能源类型" label: "能源类型"
}, },
{ {
prop: 'used', prop: 'record',
label: "用度", label: "用度",
width: 200 width: 200
}, },
{ {
prop: 'date', prop: 'recordDate',
label: "日期", label: "日期",
width: 300 width: 300
} }
...@@ -51,13 +60,13 @@ const formInline = reactive({ ...@@ -51,13 +60,13 @@ const formInline = reactive({
const config = reactive({ const config = reactive({
total: 0, total: 0,
page: 1, page: 1,
name: "", supplyName: "",
}) })
const handleSearch = () => { const handleSearch = () => {
config.name, config.supplyName,
getEnergyData(), getEnergyData(),
config.name = '' config.supplyName = ''
} }
const timeFormat = (time) => { const timeFormat = (time) => {
...@@ -74,13 +83,13 @@ const timeFormat = (time) => { ...@@ -74,13 +83,13 @@ const timeFormat = (time) => {
//表单校验规则 //表单校验规则
const rules = reactive({ const rules = reactive({
name: [{ required: true, message: "名称是必填项", trigger: "blur" }], supplyName: [{ required: true, message: "名称是必填项", trigger: "blur" }],
type: [ energyType: [
{ required: true, message: "能源类型是必填项", trigger: "blur" }, { required: true, message: "能源类型是必填项", trigger: "blur" },
], ],
used: [{ required: true, message: "能源用度是必选项", trigger: "change" }], record: [{ required: true, message: "能源用度是必选项", trigger: "change" }],
date: [{ required: true, message: "日期是必选项" }] recordDate: [{ required: true, message: "日期是必选项" }]
}) })
...@@ -113,7 +122,7 @@ const handleDelete = (row) => { ...@@ -113,7 +122,7 @@ const handleDelete = (row) => {
// 新增 // 新增
const action = ref('add') const action = ref('add')
const formEnergy = reactive({})
const handleClose = () => { const handleClose = () => {
dialogVisible.value = false dialogVisible.value = false
proxy.$ref['energyForm'].resetFields() proxy.$ref['energyForm'].resetFields()
...@@ -124,12 +133,11 @@ const handleCancel = () => { ...@@ -124,12 +133,11 @@ const handleCancel = () => {
} }
const handleAdd = () => { const handleAdd = () => {
action.value = "add", action.value = "add",
dialogVisible.value = true; dialogVisible.value = true;
proxy.$refs['energyForm'].resetFields() proxy.$refs['energyForm'].resetFields()
formEnergy.name='', formEnergy.supplyName='',
formEnergy.type='' formEnergy.energyType=''
} }
...@@ -147,9 +155,12 @@ const onSubmit = () => { ...@@ -147,9 +155,12 @@ const onSubmit = () => {
proxy.$refs['energyForm'].validate(async (valid) => { proxy.$refs['energyForm'].validate(async (valid) => {
if (valid) { if (valid) {
let res = null; let res = null;
formEnergy.date = /^\d{4}-\d{2}-\d{2}$/.test(formEnergy.date) ? formEnergy.date : timeFormat(formEnergy.date) formEnergy.recordDate = /^\d{4}-\d{2}-\d{2}$/.test(formEnergy.recordDate) ? formEnergy.recordDate : timeFormat(formEnergy.recordDate)
if (action.value === 'add') { if (action.value === 'add') {
res = await proxy.$api.addEnergy(formEnergy) // res = await proxy.$api.addEnergy(formEnergy)
res = postEnergyManageSave(formEnergy)
console.log(res);
if (res) { if (res) {
dialogVisible.value = false dialogVisible.value = false
...@@ -192,8 +203,8 @@ onMounted(() => { ...@@ -192,8 +203,8 @@ onMounted(() => {
<div class="th_div"> <div class="th_div">
<el-form ref="formRef" :model="formInline" :inline="true" <el-form ref="formRef" :model="formInline" :inline="true"
style="display: flex; justify-content: center; align-items: center; margin: 0;"> style="display: flex; justify-content: center; align-items: center; margin: 0;">
<el-form-item class="select-clean" prop="name" label-width="280px" style="margin: 0;"> <el-form-item class="select-clean" prop="supplyName" label-width="280px" style="margin: 0;">
<el-select v-model="config.name" placeholder="请选择" style="width:360px; margin-left: 20px;"> <el-select v-model="config.supplyName" placeholder="请选择" style="width:360px; margin-left: 20px;">
<el-option label="东部供热站" value="东部供热站" /> <el-option label="东部供热站" value="东部供热站" />
<el-option label="行政区供热站" value="行政区供热站" /> <el-option label="行政区供热站" value="行政区供热站" />
<el-option label="福宛里供热站" value="福宛里供热站" /> <el-option label="福宛里供热站" value="福宛里供热站" />
...@@ -255,7 +266,7 @@ onMounted(() => { ...@@ -255,7 +266,7 @@ onMounted(() => {
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-select v-model="formEnergy.name" placeholder="请选择"> <el-select v-model="formEnergy.supplyName" placeholder="请选择">
<el-option label="东部供热站" value="东部供热站" /> <el-option label="东部供热站" value="东部供热站" />
<el-option label="行政区供热站" value="行政区供热站" /> <el-option label="行政区供热站" value="行政区供热站" />
<el-option label="福宛里供热站" value="福宛里供热站" /> <el-option label="福宛里供热站" value="福宛里供热站" />
...@@ -272,7 +283,7 @@ onMounted(() => { ...@@ -272,7 +283,7 @@ onMounted(() => {
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-select v-model="formEnergy.type" placeholder="请选择"> <el-select v-model="formEnergy.energyType" placeholder="请选择">
<el-option label="热" value="1" /> <el-option label="热" value="1" />
<el-option label="水" value="2" /> <el-option label="水" value="2" />
<el-option label="电" value="3" /> <el-option label="电" value="3" />
...@@ -292,8 +303,8 @@ onMounted(() => { ...@@ -292,8 +303,8 @@ onMounted(() => {
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<el-form-item prop="used" style="margin: 0;padding: 0;width: 100%;"> <el-form-item prop="record" style="margin: 0;padding: 0;width: 100%;">
<el-input v-model="formEnergy.used" placeholder="请输入能源用度" /> <el-input v-model="formEnergy.record" placeholder="请输入能源用度" />
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
...@@ -308,8 +319,8 @@ onMounted(() => { ...@@ -308,8 +319,8 @@ onMounted(() => {
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td> <td>
<el-form-item prop="date" style="margin: 0;padding: 0;width: 100%;"> <el-form-item prop="recordDate" style="margin: 0;padding: 0;width: 100%;">
<el-date-picker value-format="YYYY-MM-DD HH:mm:ss" v-model="formEnergy.date" type="datetime" placeholder="请输入日期" style="width: 100%" /> <el-date-picker value-format="YYYY-MM-DD HH:mm:ss" v-model="formEnergy.recordDate" type="datetime" placeholder="请输入日期" style="width: 100%" />
</el-form-item> </el-form-item>
</td> </td>
</tr> </tr>
......
...@@ -2,23 +2,21 @@ ...@@ -2,23 +2,21 @@
<div class="contentBlock"> <div class="contentBlock">
<div class="contentBlockInn"> <div class="contentBlockInn">
<el-card class="card-contianer"> <el-card class="card-contianer">
<div class="card-header"> <div class="card-header">
<span>瞬时热量对比配置</span> <span>瞬时热量对比配置</span>
</div> </div>
<el-form ref="formRef" :data="formData" :model="formModel" label-width="auto">
<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="formModel.planName"></el-input> <el-input style="width: 80%" v-model="List.planName"></el-input>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
...@@ -28,12 +26,11 @@ ...@@ -28,12 +26,11 @@
<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="formModel.diffPercentage"></el-input> <el-input style="width: 80%" v-model="List.diffPercentage"></el-input>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
...@@ -43,16 +40,11 @@ ...@@ -43,16 +40,11 @@
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="text-align: left"> <td style="text-align: left">
<el-form> <el-input style="width: 80%" v-model="List.timeoutMin"></el-input>
<el-input style="width: 80%" v-model="formModel.timeoutMin"></el-input>
</el-form>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
...@@ -62,12 +54,11 @@ ...@@ -62,12 +54,11 @@
<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="formModel.tempRegulation"></el-input> <el-input style="width: 80%" v-model="List.tempRegulation"></el-input>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
...@@ -77,9 +68,9 @@ ...@@ -77,9 +68,9 @@
<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" v-model="formModel.description"></el-input> <el-input style="width: 80%" type="textarea" rows="6"
v-model="List.description"></el-input>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
...@@ -88,10 +79,9 @@ ...@@ -88,10 +79,9 @@
</table> </table>
<div class="btngrounp"> <div class="btngrounp">
<el-button type="primary">保存</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" @click="onCancel">关闭</el-button>
</div> </div>
</el-form>
</el-card> </el-card>
</div> </div>
...@@ -100,28 +90,60 @@ ...@@ -100,28 +90,60 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive, onMounted, onUnmounted } from "vue"; import { ref, reactive, onMounted, onUnmounted } from "vue";
const formModel = reactive({ import { postInstantHeat,postInstantHeatUpdate} from "@/api/scheduling"
planId: '', import { toRaw } from "@vue/reactivity";
planName: '瞬时热量偏差', import { ElMessage } from "element-plus";
diffPercentage: '10', import http from "../../api/http";
timeoutMin: '10', const loading = ref(false)
tempRegulation: '1',
description: '"预测瞬时热量"与集团"瞬时热量"进行对比,偏差10%(可变),超过10分钟(可变),对下发温度进行+-温度调节(温度可调)'
}) const List=ref([
{
"planId": "",
"planName":"",
"diffPercentage":"",
"timeoutMin":"",
"tempRegulation":"",
"description":"",
"isActive":''
}
])
const getInstanceHeat = async () => {
loading.value = true
const data = await postInstantHeat();
console.log(data);
List.value = data.data[0]
loading.value = false
}
const onSave = async() => {
// await postInstantHeatUpdate(List.value)
await http.post("/api/Scheduling/BizInstantaneousHeat/Update",{...List.value},false).then((result)=>{
}).catch((error)=>{
console.log(error)
})
ElMessage.success('修改成功')
getInstanceHeat()
}
onMounted(() => {
getInstanceHeat()
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.card-contianer { .card-contianer {
background-color: #DFE8F6; background-color: #DFE8F6;
} }
.card-header { .card-header {
text-align: center; text-align: center;
font-weight: 700; font-weight: 700;
font-size: 28px; font-size: 28px;
margin-bottom:10px; margin-bottom: 10px;
} }
.btngrounp { .btngrounp {
margin-top: 10px; margin-top: 10px;
text-align: center; text-align: center;
......
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