Commit e9099523 authored by 裴文涛's avatar 裴文涛

年度参数接口,气象干预列表接口对接完毕

parent d5655dc9
......@@ -6,3 +6,22 @@ export const postEnergyManage = params => {
})
}
export const getWeatherMagData = () => { // 获取气象干预数据
return http.get(`/api/cusweather/getData`)
}
export const alterWeatherMagData = params => { // 更新气象干预数据
return http.post(`/api/cusweather/SaveAll`, params)
}
export const getTransfer = param =>{
return http.post('/api/cusweather/getTransferIds',param)
}
export const getAnnualParam = ()=>{ // 获取年度参数列表
return http.post('/api/Scheduling/BizHeatSet/Get')
}
export const alterAnnualParam = params =>{
return http.post('/api/Scheduling/BizHeatSet/Update',params)
}
<script setup>
import {ref} from "vue";
import {onMounted, reactive, ref} from "vue";
import {zhCn} from "element-plus/es/locale/index";
import {getAnnualParam,alterAnnualParam} from '@/api/scheduling.js'
const data = [
{
paramId: "4229478e-9923-4fce-985d-0109efc1e95f", // 编号
supplyId: "33104782-c1ad-432c-953e-e31c2e031be4", // 所属供热站编号
energyType: '三步节能', // 类型(能源)
year: "2024", // 年度
standard: 44.2, // 热指标
degreeStandard: null, // 度日数标定值
indoorTemperature: 23.0, // 室内温度
outdoorTemperature: -9.0, // 室外温度
backWaterTemperature: 46.0, // 回水温度
updateNullFields: null // 无用
},
{
paramId: "4229478e-9923-4fce-985d-0109efc1e95f", // 编号
supplyId: "33104782-c1ad-432c-953e-e31c2e031be4", // 所属供热站编号
energyType: "二步节能", // 类型(能源)
year: "2024", // 年度
standard: 44.2, // 热指标
degreeStandard: null, // 度日数标定值
indoorTemperature: 23.0, // 室内温度
outdoorTemperature: -9.0, // 室外温度
backWaterTemperature: 46.0, // 回水温度
updateNullFields: null // 无用
},
{
paramId: "4229478e-9923-4fce-985d-0109efc1e95f", // 编号
supplyId: "33104782-c1ad-432c-953e-e31c2e031be4", // 所属供热站编号
energyType: null, // 类型(能源)
year: "2024", // 年度
standard: 44.2, // 热指标
degreeStandard: null, // 度日数标定值
indoorTemperature: 23.0, // 室内温度
outdoorTemperature: -9.0, // 室外温度
backWaterTemperature: 46.0, // 回水温度
updateNullFields: null // 无用
},
{
paramId: "4229478e-9923-4fce-985d-0109efc1e95f", // 编号
supplyId: "33104782-c1ad-432c-953e-e31c2e031be4", // 所属供热站编号
energyType: "二步节能", // 类型(能源)
year: "2024", // 年度
standard: 44.2, // 热指标
degreeStandard: null, // 度日数标定值
indoorTemperature: 23.0, // 室内温度
outdoorTemperature: -9.0, // 室外温度
backWaterTemperature: 46.0, // 回水温度
updateNullFields: null // 无用
},
{
paramId: "4229478e-9923-4fce-985d-0109efc1e95f", // 编号
supplyId: "33104782-c1ad-432c-953e-e31c2e031be4", // 所属供热站编号
energyType: "二步节能", // 类型(能源)
year: "2024", // 年度
standard: 44.2, // 热指标
degreeStandard: null, // 度日数标定值
indoorTemperature: 23.0, // 室内温度
outdoorTemperature: -9.0, // 室外温度
backWaterTemperature: 46.0, // 回水温度
updateNullFields: null // 无用
}
]
const data = ref()
const tableHeaderClass = data => { // 表头样式
return 'table-header-class'
}
......@@ -71,10 +11,14 @@ const tableBodyClass = data => { // 表体样式
return 'table-body-class'
}
const searchKey = ref('') // 查询参数
const page = reactive({currentPage:1,pageSize:30,total:0}) // 当前页码,每页显示条数,总条数
const currentPage = ref(1) // 当前页码
const pageSize = ref(30) // 每页显示条数
const totalData = ref(0) // 数据总条数
const reviseWindowOpen = ref(false)
const reviseForm = ref({})
const energyTypeList = ref(['一步节能','二步节能','三步节能','非节能']) // 节能等级列表
const yearList = ref(['2016','2017','2018','2019','2020','2021','2022','2023','2024','2025','2026','2027','2028','2029','2030']) // 年度列表
function handleEdit(val) {
reviseForm.value = {...val}
......@@ -83,16 +27,40 @@ function handleEdit(val) {
function handleDelete(val) {
} // 处理删除
function handleAdd() {
} // 处理新增
function handleSearch() {
} // 处理查询
function onSubmit() {
alterAnnualParam(reviseForm.value).then(res =>{
if(res.success){
getData()
handleClose()
}
})
} // 提交修改
function handleClose() {
reviseWindowOpen.value = false
} // 关闭弹窗
onMounted(()=>{
getData()
})
function getData(){
getAnnualParam().then(res =>{
data.value = res.data
page.total = res.data.length
})
}
function handleSizeChange(val) {
console.log(val)
page.pageSize = val
getData()
}
function handleCurrentChange(val) {
console.log(val)
page.currentPage = val
getData()
}
</script>
<template>
......@@ -136,14 +104,14 @@ function handleClose() {
<div class="pagination-wrapper">
<el-config-provider :locale="zhCn">
<el-pagination
v-model:current-page="currentPage"
v-model:page-size="pageSize"
v-model:current-page="page.currentPage"
v-model:page-size="page.pageSize"
:page-sizes="[30, 40, 50, 100, 200, 300]"
:small="true"
layout="total, sizes, prev, pager, next, jumper"
:total="data.length"
@change="data"
class="pagination"/>
:total="page.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</el-config-provider>
</div>
<div class="revise-window-dialog">
......@@ -156,16 +124,26 @@ function handleClose() {
<el-row first>
<el-col :span="8" col-label>节能等级:</el-col>
<el-col :span="16" col-value>
<el-select placeholder="" size="small" style="width: 370px">
<el-select placeholder="" size="small" v-model="reviseForm.energyType" style="width: 370px">
<el-option
v-for="item in energyTypeList"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="8" col-label>年度:</el-col>
<el-col :span="16" col-value>
<el-select placeholder="" size="small" style="width: 370px">
<el-select placeholder="" v-model="reviseForm.year" size="small" style="width: 370px">
<el-option
v-for="item in yearList"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-col>
</el-row>
......@@ -274,9 +252,8 @@ function handleClose() {
border-top: 1px solid #a6c3e9;
}
.el-row{
border-left: 1px solid #a6c3e9;
border-right: 1px solid #a6c3e9;
border-bottom: 1px solid #a6c3e9;
display: flex;
align-items: center;
width: 100%;
height: 35px;
color: #124362;
......
<script setup>
import {computed, isRef, ref, shallowRef} from "vue";
import {computed, isRef, onMounted, 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";
import {getWeatherMagData,alterWeatherMagData,getTransfer} from '@/api/scheduling.js'
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 data = ref()
const currentPage = ref(1) // 当前页码
const pageSize = ref(30) // 每页显示条数
const totalData = ref(0) // 数据总条数
const reviseWindowOpen = ref(false) // 修改按钮弹窗状态
const bindWindowOpen = ref(false) // 绑定按钮弹窗状态
const totalPageCount = computed(() => { // 页面左下角总页数计算
......@@ -82,10 +23,6 @@ const tableBodyClass = data => { // 表体样式
}
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
}
......@@ -95,23 +32,24 @@ const revise = (row) => { // 修改按钮单击事件
}
const bind = (row) => { // 绑定按钮单击事件
getTransfer(row.customizeId).then(res=>{
console.log(res)
})
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
if (data.value[i].customizeId === val.customizeId) {
// data.value[i] = {...val}
console.log(val)
// alterWeatherMagData(val).then(res => {
// console.log(res)
// console.log("操作结果")
// }).catch(err=>{
// console.log("错误信息",err)
// })
break
}
}
......@@ -121,6 +59,17 @@ const confirmBind = val => {
console.log("处理换热站绑定")
bindWindowOpen.value = false
}
onMounted(()=>{
getData()
})
function getData(){
getWeatherMagData().then(res =>{
data.value = res.data
totalData.value = data.value.length
console.log(data.value)
})
}
</script>
<template>
......@@ -144,18 +93,18 @@ const confirmBind = val => {
: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="allowPagingId" label="编号" align="center" width="60"/>
<el-table-column prop="customizeName" label="自定义名称" width="200"/>
<el-table-column prop="supplyName" label="供热站名称" width="160"/>
<el-table-column prop="operateTime" label="操作时间" width="210"/>
<el-table-column prop="interventionMode" label="干预模式" width="120"/>
<el-table-column prop="isFixed" label="干预模式" width="120"/>
<el-table-column prop="temperature" label="温度" width="60"/>
<el-table-column prop="windSpeed" label="风速" width="60"/>
<el-table-column prop="wind" 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="自动偏差百分比" width="170"/>
<el-table-column prop="verifyTime" label="验证时间" width="100"/>
<el-table-column prop="adjustTemperature" label="调节温度" width="100"/>
<el-table-column prop="isAuto" label="手自动切换" width="120"/>
<el-table-column prop="diffPercentage" label="自动偏差百分比" width="170"/>
<el-table-column prop="timeoutMin" label="验证时间" width="100"/>
<el-table-column prop="tempRegulation" label="调节温度" width="100"/>
<el-table-column prop="sort" label="排序" width="60"/>
<el-table-column label="操作" width="200">
<template #default="scope">
......@@ -196,8 +145,8 @@ const confirmBind = val => {
:page-sizes="[30, 40, 50, 100, 200, 300]"
:small="true"
layout="total, sizes, prev, pager, next, jumper"
:total="data.length"
@change="data"
:total="totalData"
@change="getData"
class="pagination"/>
</el-config-provider>
</div>
......
......@@ -21,9 +21,7 @@ const emit = defineEmits({
})
const bindData = ref({})
watchEffect(()=>{
bindData.value.id = props.data.id
bindData.value.customName = props.data.customName
bindData.value.heatingStationName = props.data.heatingStationName
bindData.value = {...props.data}
})
const inputStyle = {
color: 'black',
......@@ -71,13 +69,13 @@ const onSubmit = ()=>{
<el-row style="border-top: #a6c3e9 1px solid" class="not-select-row">
<el-col :span="8" class="content-col-label">自定义名称:</el-col>
<el-col :span="16" class="content-col-value">
<el-input v-model="bindData.customName" style="width: 510px" :input-style="inputStyle"/>
<el-input v-model="bindData.customizeName" style="width: 510px" :input-style="inputStyle"/>
</el-col>
</el-row>
<el-row class="not-select-row">
<el-col :span="8" class="content-col-label">供热站:</el-col>
<el-col :span="16" class="content-col-value">
<el-select v-model="bindData.heatingStationName" style="width: 210px;" class="custom-select" size="small">
<el-select v-model="bindData.supplyName" placeholder="" style="width: 210px;" class="custom-select" size="small">
<el-option v-for="item in heatingStationList" :key="item" :label="item" :value="item"/>
</el-select>
</el-col>
......
......@@ -21,34 +21,24 @@ const emit = defineEmits({
})
const reviseData = ref({})
watchEffect(()=>{
reviseData.value.id = props.data.id
reviseData.value.customName = props.data.customName
reviseData.value.interventionMode = props.data.interventionMode
reviseData.value.temperature = props.data.temperature
reviseData.value.windSpeed = props.data.windSpeed
reviseData.value.illumination = props.data.illumination
reviseData.value.sort = props.data.sort
reviseData.value.switching = props.data.switching
reviseData.value.deviationPercentage = props.data.deviationPercentage
reviseData.value.verifyTime = props.data.verifyTime
reviseData.value.adjustTemperature = props.data.adjustTemperature
reviseData.value = {...props.data}
})
const inputStyle = {
color: 'black',
height: '24px'
}
const switchingModel = computed({
const switchingisAuto = computed({
get() {
return reviseData.value.switching === '自动模式'
return reviseData.value.isAuto === '自动模式'
},
set(newValue) {
if (newValue) {
reviseData.value.switching = '自动模式'
reviseData.value.isAuto = '自动模式'
} else {
reviseData.value.switching = '手动模式'
reviseData.value.isAuto = '手动模式'
}
}
}) // 可写计算属性
}) // 可写计算属性,手动、自动模式切换
</script>
<template>
......@@ -62,13 +52,13 @@ const switchingModel = computed({
<el-row style="border-top: #a6c3e9 1px solid">
<el-col :span="8" class="content-col-label">自定义名称:</el-col>
<el-col :span="16" class="content-col-value">
<el-input :input-style="inputStyle" v-model="reviseData.customName" style="width: 510px"/>
<el-input :input-style="inputStyle" v-model="reviseData.customizeName" style="width: 510px"/>
</el-col>
</el-row>
<el-row>
<el-col :span="8" class="content-col-label">干预模式:</el-col>
<el-col :span="16" class="content-col-value">
<el-radio-group v-model="reviseData.interventionMode">
<el-radio-group v-model="reviseData.isFixed">
<el-radio value="固定模式" :style="{marginLeft:'10px'}">固定模式</el-radio>
<el-radio value="气象仪模式" :style="{marginLeft:'-15px'}">气象仪模式</el-radio>
</el-radio-group>
......@@ -83,7 +73,7 @@ const switchingModel = computed({
<el-row>
<el-col :span="8" class="content-col-label">风速:</el-col>
<el-col :span="16" class="content-col-value">
<el-input :input-style="inputStyle" v-model="reviseData.windSpeed" style="width: 510px"/>
<el-input :input-style="inputStyle" v-model="reviseData.wind" style="width: 510px"/>
</el-col>
</el-row>
<el-row>
......@@ -101,21 +91,21 @@ const switchingModel = computed({
<el-row>
<el-col :span="5" class="content-col-label">切换自动模式:</el-col>
<el-col :span="7" class="content-col-value">
<el-checkbox :style="{marginLeft:'10px'}" v-model="switchingModel" label="自动模式"/>
<el-checkbox :style="{marginLeft:'10px'}" v-model="switchingisAuto" label="自动模式"/>
</el-col>
<el-col :span="5" class="content-col-label">自动偏差百分比(%d):</el-col>
<el-col :span="7" class="content-col-value">
<el-input :input-style="inputStyle" v-model="reviseData.deviationPercentage" style="width: 240px"/>
<el-input :input-style="inputStyle" v-model="reviseData.diffPercentage" style="width: 240px"/>
</el-col>
</el-row>
<el-row>
<el-col :span="5" class="content-col-label">自动验证循环时间(分钟):</el-col>
<el-col :span="7" class="content-col-value">
<el-input :input-style="inputStyle" v-model="reviseData.verifyTime" style="width: 240px"/>
<el-input :input-style="inputStyle" v-model="reviseData.timeoutMin" style="width: 240px"/>
</el-col>
<el-col :span="5" class="content-col-label">自动调节温度(℃):</el-col>
<el-col :span="7" class="content-col-value">
<el-input :input-style="inputStyle" v-model="reviseData.adjustTemperature" style="width: 240px"/>
<el-input :input-style="inputStyle" v-model="reviseData.tempRegulation" style="width: 240px"/>
</el-col>
</el-row>
</div>
......
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