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

解决冲突第二次

parent 489feba1
import http from './http'
//能源消耗-获取
export const postEnergyManage = params => {
<<<<<<< HEAD
return http.post(`/api/energy/getData`, params).then(res => res).catch(function (error) {
console.log(error);
})
=======
return http.post(`/api/energy/getData`, params).then(res => res).catch(function (error) {
console.log(error);
})
>>>>>>> 4ac876ed216e6184e11a156638cd9a19a43ddb02
}
// 能源消耗-删除
// export const postEnergyDel = EnergyId => {
......@@ -33,46 +27,27 @@ export const postEnergyUpdate = params => {
// 瞬时热量-获取列表
export const postInstantHeat = params => {
<<<<<<< HEAD
return http.post(`api/Scheduling/BizInstantaneousHeat/Get`).then(res => res).catch(function (error) {
console.log(error);
})
=======
return http.post(`api/Scheduling/BizInstantaneousHeat/Get`).then(res => res).catch(function (error) {
console.log(error);
})
>>>>>>> 4ac876ed216e6184e11a156638cd9a19a43ddb02
}
// 瞬时热量-新增修改
export const postInstantHeatUpdate = params => {
<<<<<<< HEAD
return http.post(`api/Scheduling/BizInstantaneousHeat/Update`, params).then(res => res).catch(function (error) {
console.log(error);
})
=======
return http.post(`api/Scheduling/BizInstantaneousHeat/Update`, params).then(res => res).catch(function (error) {
console.log(error);
})
>>>>>>> 4ac876ed216e6184e11a156638cd9a19a43ddb02
}
// 参数设置
export const postConfigBoilerUpdate = params => {
<<<<<<< HEAD
return http.post(`api/configboiler/Save`, params).then(res => res).catch(function (error) {
console.log(error);
})
=======
return http.post(`api/configboiler/Save`, params).then(res => res).catch(function (error) {
console.log(error);
})
>>>>>>> 4ac876ed216e6184e11a156638cd9a19a43ddb02
}
export const postSecAbsTUc = params => {
<<<<<<< HEAD
return http.post(`/api/analysis/external/SecAbsTUc`, params).then(res => res).catch(function (error) {
console.log(error);
})
......@@ -82,18 +57,13 @@ export const postEnergyManageSave = params => {
return http.post(`/api/energy/Save`, params).then(res => res).catch(function (error) {
console.log(error);
})
=======
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);
})
>>>>>>> 4ac876ed216e6184e11a156638cd9a19a43ddb02
}
// export const postEnergyManageSave = params => {
// return http.post(`/api/energy/Save`, params).then(res => res).catch(function (error) {
// console.log(error);
// })
// }
export const getWeatherMagData = () => { // 获取气象干预数据
......@@ -105,27 +75,22 @@ export const alterWeatherMagData = params => { // 添加或修改气象干预数
}
export const getTransfer = param => { // 获取换热站列表
<<<<<<< HEAD
return http.post(`/api/cusweather/getTransferIds?id=${param}`, param)
}
export const getAnnualParam = () => { // 获取年度参数列表
return http.post('/api/Scheduling/BizHeatSet/Get')
=======
return http.post(`/api/cusweather/getTransferIds?id=${param}`, param)
}
export const getAnnualParam = () => { // 获取年度参数列表
return http.post('/api/Scheduling/BizHeatSet/Get')
>>>>>>> 4ac876ed216e6184e11a156638cd9a19a43ddb02
}
// export const getAnnualParam = () => { // 获取年度参数列表
// return http.post('/api/Scheduling/BizHeatSet/Get')
// }
export const alterAnnualParam = params => { // 修改年度参数
return http.post('/api/Scheduling/BizHeatSet/Update', params)
}
export const addAnnualParam = params => { // 新增年度参数
<<<<<<< HEAD
return http.post('/api/Scheduling/BizHeatSet/Add', params)
}
......@@ -136,19 +101,16 @@ export const deleteAnnualParam = params => { // 删除年度参数
export const getPhenomenon = () => { // 获取数据列表————天气工况
return http.post('/api/Scheduling/WeatherCondition/Get')
=======
return http.post('/api/Scheduling/BizHeatSet/Add', params)
}
export const deleteAnnualParam = params => { // 删除年度参数
// console.log("地址:",`/api/Scheduling/BizHeatSet/Delete?Id=${params}`)
return http.post(`/api/Scheduling/BizHeatSet/Delete?Id=${params}`)
}
// export const deleteAnnualParam = params => { // 删除年度参数
// // console.log("地址:",`/api/Scheduling/BizHeatSet/Delete?Id=${params}`)
// return http.post(`/api/Scheduling/BizHeatSet/Delete?Id=${params}`)
// }
export const getPhenomenon = () => { // 获取数据列表————天气工况
return http.post('/api/Scheduling/WeatherCondition/Get')
>>>>>>> 4ac876ed216e6184e11a156638cd9a19a43ddb02
}
// export const getPhenomenon = () => { // 获取数据列表————天气工况
// return http.post('/api/Scheduling/WeatherCondition/Get')
// }
export const addPhenomenon = params => { // 新增数据————天气工况
return http.post('/api/Scheduling/WeatherCondition/Add', params)
......@@ -158,11 +120,7 @@ export const alterPhenomenon = params => { // 修改数据————天气工
}
export const deletePhenomenon = params => { // 删除数据————天气工况
<<<<<<< HEAD
return http.post(`/api/Scheduling/WeatherCondition/Delete?Id=${params}`)
=======
return http.post(`/api/Scheduling/WeatherCondition/Delete?Id=${params}`)
>>>>>>> 4ac876ed216e6184e11a156638cd9a19a43ddb02
}
export const getWind = () => { // 获取数据列表————风力配置
......
......@@ -5,6 +5,7 @@ import {getAnnualParam,alterAnnualParam,addAnnualParam,deleteAnnualParam} from '
import {ElMessageBox} from "element-plus";
const data = ref()
const dataBackup = ref([])
const tableHeaderClass = data => { // 表头样式
return 'table-header-class'
}
......@@ -63,6 +64,11 @@ function handleAdd() {
addWindowOpen.value = true
} // 处理新增
function handleSearch() {
if(!searchKey.value){
getData()
}else {
data.value = dataBackup.value.filter(item => item.year.includes(searchKey.value))
}
} // 处理查询
function onSubmit() {
alterAnnualParam(reviseForm.value).then(res =>{
......@@ -96,6 +102,7 @@ onMounted(()=>{
function getData(){
getAnnualParam().then(res =>{
data.value = res.data
dataBackup.value = [...data.value]
})
}
function resetInput(){
......@@ -117,11 +124,11 @@ function resetInput(){
<el-row>
<el-col :span="8" label>年度:</el-col>
<el-col :span="16">
<el-input v-model="searchKey"/>
<el-input clearable v-model="searchKey"/>
</el-col>
</el-row>
<el-button type="primary" class="add-search-btn" @click="handleAdd">新增</el-button>
<el-button type="primary" class="add-search-btn" @click="handleSearch">查询</el-button>
<el-button type="primary" class="add-search-btn" @click="handleAdd">新增</el-button>
</div>
<div class="table-wrapper">
<el-table
......
......@@ -4,6 +4,7 @@ import {ElMessageBox} from "element-plus";
import {getPhenomenon,addPhenomenon,alterPhenomenon,deletePhenomenon} from "@/api/scheduling.js"
const data = ref()
const dataBackup = ref([])
const searchKey = ref('') // 查询参数
const reviseWindowOpen = ref(false)
const addWindowOpen = ref(false)
......@@ -23,6 +24,13 @@ function revise(val){
reviseForm.value = {...val}
reviseWindowOpen.value = true
} // 修改按钮单击事件
function search(){
if(!searchKey.value){
getData()
}else {
data.value = dataBackup.value.filter(item => item.phenomenonName.includes(searchKey.value))
}
}
function omit(val){
let id = val.phenomenonId
ElMessageBox.confirm(
......@@ -72,6 +80,7 @@ onMounted(()=>{
function getData(){
getPhenomenon().then(res => {
data.value = res.data
dataBackup.value = [...data.value]
})
}
</script>
......@@ -81,10 +90,10 @@ function getData(){
<el-row>
<el-col :span="8" label>名称:</el-col>
<el-col :span="16">
<el-input v-model="searchKey"/>
<el-input clearable v-model="searchKey"/>
</el-col>
</el-row>
<el-button type="primary" class="add-search-btn">查询</el-button>
<el-button type="primary" @click="search" class="add-search-btn">查询</el-button>
<el-button type="primary" @click="add" class="add-search-btn">新增</el-button>
</div>
<div class="table-wrapper">
......
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