Commit d6fa5f42 authored by 朱超's avatar 朱超

报表更新

parent 39675fe6
<template> <template>
<div class="contentBlock"> <div
class="contentBlock"
v-loading="loading"
element-loading-background="rgba(122, 122, 122, 0.6)"
>
<div class="contentBlockInn" id="printBlock"> <div class="contentBlockInn" id="printBlock">
<el-card class="card-contianer"> <el-card class="card-contianer">
<table <table
...@@ -111,7 +115,11 @@ ...@@ -111,7 +115,11 @@
</td> </td>
</tr> </tr>
</table> </table>
<el-table :data="tableData" style="width: 100%; margin-top: 10px"> <el-table
:data="tableData"
empty-text="暂无数据"
style="width: 100%; margin-top: 10px"
>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="jurisdictionName" label="区域名称" /> <el-table-column prop="jurisdictionName" label="区域名称" />
...@@ -213,6 +221,7 @@ import { saveAs } from "file-saver"; ...@@ -213,6 +221,7 @@ import { saveAs } from "file-saver";
import XLSX from "xlsx-js-style"; import XLSX from "xlsx-js-style";
import { postTransferArea } from "../../api/report"; import { postTransferArea } from "../../api/report";
import print from "vue3-print-nb"; import print from "vue3-print-nb";
const loading = ref(false);
const radioTitle = ref("供热站"); const radioTitle = ref("供热站");
const options = reactive([]); const options = reactive([]);
const enterpriseId = ref(null); const enterpriseId = ref(null);
...@@ -411,7 +420,6 @@ function postTransferAreaFun() { ...@@ -411,7 +420,6 @@ function postTransferAreaFun() {
enertyInfo.jurisdictionIds.forEach((item) => { enertyInfo.jurisdictionIds.forEach((item) => {
options.forEach((item1) => { options.forEach((item1) => {
if (item1.value == item) { if (item1.value == item) {
console.log(item1.lable);
areaName.value.push(item1.lable); areaName.value.push(item1.lable);
} }
}); });
...@@ -423,7 +431,7 @@ function postTransferAreaFun() { ...@@ -423,7 +431,7 @@ function postTransferAreaFun() {
} else { } else {
supplyYearSend = enertyInfo.supplyYear.split("-")[1]; supplyYearSend = enertyInfo.supplyYear.split("-")[1];
} }
loading.value = true;
let params = { let params = {
jurisdictionIds: enertyInfo.jurisdictionIds, jurisdictionIds: enertyInfo.jurisdictionIds,
supplyYear: supplyYearSend, supplyYear: supplyYearSend,
...@@ -448,13 +456,13 @@ function postTransferAreaFun() { ...@@ -448,13 +456,13 @@ function postTransferAreaFun() {
} else { } else {
ElMessage.error(res.message); ElMessage.error(res.message);
} }
loading.value = false;
}); });
} }
onMounted(() => { onMounted(() => {
initRadioList(); initRadioList();
postTransferAreaFun(); postTransferAreaFun();
//postHeatForecastFun();
}); });
onUnmounted(() => {}); onUnmounted(() => {});
</script> </script>
......
...@@ -673,12 +673,21 @@ function postHeatForecastFun() { ...@@ -673,12 +673,21 @@ function postHeatForecastFun() {
}; };
postHeatForecast(params).then((res) => { postHeatForecast(params).then((res) => {
if (res.success === true) { if (res.success === true) {
temp.value = res.data.temp; res.data.temp ? (temp.value = res.data.temp) : (temp.value = {});
predTemp.value = res.data.predTemp; res.data.predTemp
weather.value = res.data.weather; ? (predTemp.value = res.data.predTemp)
dataList.value = res.data.list; : (predTemp.value = {});
dataTime.value = res.data.time; res.data.weather
? (weather.value = res.data.weather)
: (weather.value = {});
res.data.list ? (dataList.value = res.data.list) : (dataList.value = {});
res.data.time ? (dataTime.value = res.data.time) : (dataTime.value = {});
} else { } else {
temp.value = {};
predTemp.value = {};
weather.value = {};
dataList.value = {};
dataTime.value = {};
ElMessage.error(res.message); ElMessage.error(res.message);
} }
loading.value = false; loading.value = false;
...@@ -696,12 +705,21 @@ function postPrintHeatForecastFun() { ...@@ -696,12 +705,21 @@ function postPrintHeatForecastFun() {
}; };
postPrintHeatForecast(params).then((res) => { postPrintHeatForecast(params).then((res) => {
if (res.success === true) { if (res.success === true) {
temp.value = res.data.temp; res.data.temp ? (temp.value = res.data.temp) : (temp.value = {});
predTemp.value = res.data.predTemp; res.data.predTemp
weather.value = res.data.weather; ? (predTemp.value = res.data.predTemp)
dataList.value = res.data.list; : (predTemp.value = {});
dataTime.value = res.data.time; res.data.weather
? (weather.value = res.data.weather)
: (weather.value = {});
res.data.list ? (dataList.value = res.data.list) : (dataList.value = {});
res.data.time ? (dataTime.value = res.data.time) : (dataTime.value = {});
} else { } else {
temp.value = {};
predTemp.value = {};
weather.value = {};
dataList.value = {};
dataTime.value = {};
ElMessage.error(res.message); ElMessage.error(res.message);
} }
loading.value = false; loading.value = false;
......
...@@ -800,7 +800,7 @@ function timeFun() { ...@@ -800,7 +800,7 @@ function timeFun() {
const prehour = new Date(today.getTime() - 60 * 60 * 1000); const prehour = new Date(today.getTime() - 60 * 60 * 1000);
today.setDate(today.getDate()); today.setDate(today.getDate());
enertyInfo.queryTime = enertyInfo.queryTime =
today.toISOString().split("T")[0] + " " + prehour.getHours() + ":00:0"; today.toISOString().split("T")[0] + " " + prehour.getHours() + ":00:00";
} }
function postHeatAnalysisFun() { function postHeatAnalysisFun() {
...@@ -809,11 +809,6 @@ function postHeatAnalysisFun() { ...@@ -809,11 +809,6 @@ function postHeatAnalysisFun() {
return false; return false;
} }
loading.value = true; loading.value = true;
predictionTemp.value = {};
realTemp.value = {};
comprehensiveTemp.value = {};
analysisSupplys.value = {};
analysisZones.value = {};
let params = { let params = {
QueryTime: enertyInfo.queryTime, QueryTime: enertyInfo.queryTime,
}; };
...@@ -835,6 +830,11 @@ function postHeatAnalysisFun() { ...@@ -835,6 +830,11 @@ function postHeatAnalysisFun() {
? (analysisZones.value = res.data.analysisZones) ? (analysisZones.value = res.data.analysisZones)
: (analysisZones.value = {}); : (analysisZones.value = {});
} else { } else {
predictionTemp.value = {};
realTemp.value = {};
comprehensiveTemp.value = {};
analysisSupplys.value = {};
analysisZones.value = {};
ElMessage.error(res.message); ElMessage.error(res.message);
} }
loading.value = false; loading.value = false;
......
<template> <template>
<div class="contentBlock"> <div
class="contentBlock"
v-loading="loading"
element-loading-background="rgba(122, 122, 122, 0.6)"
>
<div class="contentBlockInn" id="printBlock"> <div class="contentBlockInn" id="printBlock">
<el-card class="card-contianer"> <el-card class="card-contianer">
<table <table
...@@ -8,8 +12,13 @@ ...@@ -8,8 +12,13 @@
style="background-color: #99bbe8" style="background-color: #99bbe8"
> >
<tr> <tr>
<th style="text-align:center;"> <th style="text-align: center">
<span style="font-size:24px;">港益热量汇总实时分析<span style="font-size:14px; margin-left:10px;">当前时间:{{ enertyInfo.nowTime }}</span></span> <span style="font-size: 24px"
>港益热量汇总实时分析<span
style="font-size: 14px; margin-left: 10px"
>当前时间:{{ enertyInfo.nowTime }}</span
></span
>
</th> </th>
</tr> </tr>
</table> </table>
...@@ -59,10 +68,26 @@ ...@@ -59,10 +68,26 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="predictionHeat" label="预测瞬时热量" width="130" /> <el-table-column
<el-table-column prop="currentPredictionHeat" label="当前预测热量累计" width="150" /> prop="predictionHeat"
<el-table-column prop="currentDifference" label="当前热量偏差量" width="150" /> label="预测瞬时热量"
<el-table-column prop="groupFirstSupplyTemp" width="150" align="center"> width="130"
/>
<el-table-column
prop="currentPredictionHeat"
label="当前预测热量累计"
width="150"
/>
<el-table-column
prop="currentDifference"
label="当前热量偏差量"
width="150"
/>
<el-table-column
prop="groupFirstSupplyTemp"
width="150"
align="center"
>
<template v-slot:header> <template v-slot:header>
<div> <div>
<div>滨海供热集团</div> <div>滨海供热集团</div>
...@@ -81,9 +106,9 @@ ...@@ -81,9 +106,9 @@
<el-table-column <el-table-column
prop="groupFirstSupplyPress" prop="groupFirstSupplyPress"
width="150" width="150"
align="center" align="center"
> >
<template v-slot:header> <template v-slot:header>
<div> <div>
<div>滨海供热集团</div> <div>滨海供热集团</div>
<span>供水压力(MP)</span> <span>供水压力(MP)</span>
...@@ -95,60 +120,62 @@ ...@@ -95,60 +120,62 @@
width="150" width="150"
align="center" align="center"
> >
<template v-slot:header> <template v-slot:header>
<div> <div>
<div>滨海供热集团</div> <div>滨海供热集团</div>
<span>回水压力(MP)</span> <span>回水压力(MP)</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="groupSupplyFlow" width="180" align="center">
prop="groupSupplyFlow" <template v-slot:header>
width="180"
align="center"
>
<template v-slot:header>
<div> <div>
<div>滨海供热集团</div> <div>滨海供热集团</div>
<span>供水瞬时流量(m³/h)</span> <span>供水瞬时流量(m³/h)</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="groupSupplyHeat" width="180" align="center">
prop="groupSupplyHeat" <template v-slot:header>
width="180"
align="center"
>
<template v-slot:header>
<div> <div>
<div>滨海供热集团</div> <div>滨海供热集团</div>
<span>供水瞬时热量(GJ/H)</span> <span>供水瞬时热量(GJ/H)</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" prop="currentRealHeat" label="当前实际热量累计" /> <el-table-column
fixed="right"
prop="currentRealHeat"
label="当前实际热量累计"
/>
</el-table> </el-table>
<table <table
cellpadding="0" cellpadding="0"
cellspacing="1" cellspacing="1"
class="bottomTable" class="bottomTable"
style="width: 100%;" style="width: 100%"
> >
<tr> <tr>
<td style="text-align:center; width:50%;">预测方案生成 瞬时热量(GJ/H)</td> <td style="text-align: center; width: 50%">
<td style="text-align:center;">{{ tableDataList.prePlan }}</td> 预测方案生成 瞬时热量(GJ/H)
</td>
<td style="text-align: center">{{ tableDataList.prePlan }}</td>
</tr> </tr>
<tr> <tr>
<td style="text-align:center;">滨海供热集团汇总 瞬时热量(GJ/H)</td> <td style="text-align: center">滨海供热集团汇总 瞬时热量(GJ/H)</td>
<td style="text-align:center;">{{ tableDataList.groupTotal }}</td> <td style="text-align: center">{{ tableDataList.groupTotal }}</td>
</tr> </tr>
<tr> <tr>
<td style="text-align:center;">预测瞬时热量与汇总 瞬时热量 差两(GJ/H)</td> <td style="text-align: center">
<td style="text-align:center;">{{ tableDataList.prePlanDiff }}</td> 预测瞬时热量与汇总 瞬时热量 差两(GJ/H)
</td>
<td style="text-align: center">{{ tableDataList.prePlanDiff }}</td>
</tr> </tr>
<tr> <tr>
<td style="text-align:center;">预测瞬时热量与汇总 瞬时热量 差量比(%)</td> <td style="text-align: center">
<td style="text-align:center;">{{ tableDataList.diffPercent }}</td> 预测瞬时热量与汇总 瞬时热量 差量比(%)
</td>
<td style="text-align: center">{{ tableDataList.diffPercent }}</td>
</tr> </tr>
</table> </table>
<div> <div>
...@@ -170,11 +197,11 @@ ...@@ -170,11 +197,11 @@
style="margin: 15px 0 0 10px" style="margin: 15px 0 0 10px"
>导出</el-button >导出</el-button
> >
<router-link to="/Forecast"><el-button <router-link to="/Forecast"
type="primary" ><el-button type="primary" style="margin: 15px 0 0 10px"
style="margin: 15px 0 0 10px" >返回</el-button
>返回</el-button ></router-link
></router-link> >
</div> </div>
</div> </div>
</el-card> </el-card>
...@@ -187,7 +214,11 @@ ...@@ -187,7 +214,11 @@
style="background-color: #ff0" style="background-color: #ff0"
> >
<tr> <tr>
<td colspan="17">港益热量汇总实时分析&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当前时间:{{ enertyInfo.nowTime }}</td> <td colspan="17">
港益热量汇总实时分析&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当前时间:{{
enertyInfo.nowTime
}}
</td>
</tr> </tr>
<tr> <tr>
<td>地点</td> <td>地点</td>
...@@ -228,22 +259,38 @@ ...@@ -228,22 +259,38 @@
<td>{{ item.currentRealHeat }}</td> <td>{{ item.currentRealHeat }}</td>
</tr> </tr>
<tr> <tr>
<td colspan="17">预测方案生成 瞬时热量(GJ/H)&nbsp;&nbsp;&nbsp;&nbsp;{{ tableDataList.prePlan }}</td> <td colspan="17">
预测方案生成 瞬时热量(GJ/H)&nbsp;&nbsp;&nbsp;&nbsp;{{
tableDataList.prePlan
}}
</td>
</tr> </tr>
<tr> <tr>
<td colspan="17">滨海供热集团汇总 瞬时热量(GJ/H)&nbsp;&nbsp;&nbsp;&nbsp;{{ tableDataList.groupTotal }}</td> <td colspan="17">
滨海供热集团汇总 瞬时热量(GJ/H)&nbsp;&nbsp;&nbsp;&nbsp;{{
tableDataList.groupTotal
}}
</td>
</tr> </tr>
<tr> <tr>
<td colspan="17">预测瞬时热量与汇总 瞬时热量 差两(GJ/H)&nbsp;&nbsp;&nbsp;&nbsp;{{ tableDataList.prePlanDiff }}</td> <td colspan="17">
预测瞬时热量与汇总 瞬时热量 差两(GJ/H)&nbsp;&nbsp;&nbsp;&nbsp;{{
tableDataList.prePlanDiff
}}
</td>
</tr> </tr>
<tr> <tr>
<td colspan="17">预测瞬时热量与汇总 瞬时热量 差量比(%)&nbsp;&nbsp;&nbsp;&nbsp;{{ tableDataList.diffPercent }}</td> <td colspan="17">
预测瞬时热量与汇总 瞬时热量 差量比(%)&nbsp;&nbsp;&nbsp;&nbsp;{{
tableDataList.diffPercent
}}
</td>
</tr> </tr>
</table> </table>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, reactive, onMounted, onUnmounted } from "vue"; import { ref, reactive, onMounted, onUnmounted, onActivated } from "vue";
import http from "../../api/http"; import http from "../../api/http";
import zhCn from "element-plus/dist/locale/zh-cn.mjs"; import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
...@@ -251,10 +298,11 @@ import { saveAs } from "file-saver"; ...@@ -251,10 +298,11 @@ import { saveAs } from "file-saver";
import XLSX from "xlsx-js-style"; import XLSX from "xlsx-js-style";
import { postRealAnalysis } from "../../api/report"; import { postRealAnalysis } from "../../api/report";
import print from "vue3-print-nb"; import print from "vue3-print-nb";
const loading = ref(false);
const enertyInfo = reactive({ const enertyInfo = reactive({
nowTime: null, nowTime: null,
queryTime: null queryTime: null,
}) });
const tableDataList = ref([]); const tableDataList = ref([]);
const tableData = ref([]); const tableData = ref([]);
const vPrint = print; const vPrint = print;
...@@ -390,41 +438,49 @@ function exportTableToExcel() { ...@@ -390,41 +438,49 @@ function exportTableToExcel() {
ElMessage.success("导出成功!请稍后。。。"); ElMessage.success("导出成功!请稍后。。。");
} }
function postRealAnalysisFun() { function postRealAnalysisFun() {
var date = new Date(); const today = new Date();
var year = date.getFullYear(); const prehour = new Date(today.getTime() - 60 * 60 * 1000);
var dateArr = [ today.setDate(today.getDate());
date.getMonth() + 1, enertyInfo.queryTime =
date.getDate(), today.toISOString().split("T")[0] + " " + prehour.getHours() + ":00:00";
date.getHours(),
date.getMinutes(),
date.getSeconds(),
];
enertyInfo.nowTime = year + "-" + dateArr[0] + "-" + dateArr[1] + " " + dateArr[2] + ":" + dateArr[3] + ":" + dateArr[4];
enertyInfo.queryTime = year + "-" + dateArr[0] + "-" + dateArr[1] + " " + dateArr[2] + ":" + "00:00";
console.log(enertyInfo.queryTime);
let params = { let params = {
QueryTime: "2024-01-01 09:00:00", QueryTime: enertyInfo.queryTime,
//QueryTime: year + "-" + dateArr[0] + "-" + dateArr[1] + " " + dateArr[2] + ":" + "00:00"
}; };
loading.value = true;
postRealAnalysis(params).then((res) => { postRealAnalysis(params).then((res) => {
if (res.success === true) { if (res.success === true) {
tableDataList.value = res.data[0]; tableDataList.value = res.data[0];
tableData.value = res.data[0].repData; tableData.value = res.data[0].repData;
tableData.value.forEach(element => { tableData.value.forEach((element) => {
element.firstInstantaneousFlow = parseFloat(element.firstInstantaneousFlow).toFixed(1); element.firstInstantaneousFlow = parseFloat(
element.firstInstantaneousFlow
).toFixed(1);
element.predictionHeat = parseFloat(element.predictionHeat).toFixed(1); element.predictionHeat = parseFloat(element.predictionHeat).toFixed(1);
element.currentPredictionHeat = element.currentPredictionHeat ? element.currentPredictionHeat : "-"; element.currentPredictionHeat = element.currentPredictionHeat
element.currentDifference = element.currentDifference ? element.currentDifference : "-"; ? element.currentPredictionHeat
element.groupFirstSupplyPress = element.groupFirstSupplyPress ? element.groupFirstSupplyPress : "-"; : "-";
element.groupFirstBackPress = element.groupFirstBackPress ? element.groupFirstBackPress : "-"; element.currentDifference = element.currentDifference
element.currentRealHeat = element.currentRealHeat ? element.currentRealHeat : "-"; ? element.currentDifference
}) : "-";
element.groupFirstSupplyPress = element.groupFirstSupplyPress
? element.groupFirstSupplyPress
: "-";
element.groupFirstBackPress = element.groupFirstBackPress
? element.groupFirstBackPress
: "-";
element.currentRealHeat = element.currentRealHeat
? element.currentRealHeat
: "-";
});
} else { } else {
ElMessage.error(res.message); ElMessage.error(res.message);
} }
loading.value = false;
}); });
} }
onActivated(() => {
postRealAnalysisFun();
});
onMounted(() => { onMounted(() => {
postRealAnalysisFun(); postRealAnalysisFun();
}); });
......
<template> <template>
<div class="contentBlock"> <div
class="contentBlock"
v-loading="loading"
element-loading-background="rgba(122, 122, 122, 0.6)"
>
<div class="contentBlockInn" id="printBlock"> <div class="contentBlockInn" id="printBlock">
<el-card class="card-contianer"> <el-card class="card-contianer">
<table <table
cellpadding="0" cellpadding="0"
cellspacing="1" cellspacing="1"
style="background-color: #99bbe8" style="background-color: #99bbe8"
empty-text="暂无数据"
> >
<tr> <tr>
<th style="width: 25%">起始时间</th> <th style="width: 25%">起始时间</th>
...@@ -144,17 +149,17 @@ ...@@ -144,17 +149,17 @@
<td>电量(KWH/㎡)</td> <td>电量(KWH/㎡)</td>
</tr> </tr>
<tr v-for="item in tableData" :key="item.sn"> <tr v-for="item in tableData" :key="item.sn">
<td>{{item.sn}}</td> <td>{{ item.sn }}</td>
<td>{{item.jurisdictionName}}</td> <td>{{ item.jurisdictionName }}</td>
<td>{{item.transferName}}</td> <td>{{ item.transferName }}</td>
<td>{{item.area}}</td> <td>{{ item.area }}</td>
<td>{{item.heat}}</td> <td>{{ item.heat }}</td>
<td>{{item.heatG}}</td> <td>{{ item.heatG }}</td>
<td>{{item.heatW}}</td> <td>{{ item.heatW }}</td>
<td>{{item.water}}</td> <td>{{ item.water }}</td>
<td>{{item.waterUsed}}</td> <td>{{ item.waterUsed }}</td>
<td>{{item.electric}}</td> <td>{{ item.electric }}</td>
<td>{{item.electricUsed}}</td> <td>{{ item.electricUsed }}</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -169,6 +174,7 @@ import { saveAs } from "file-saver"; ...@@ -169,6 +174,7 @@ import { saveAs } from "file-saver";
import XLSX from "xlsx-js-style"; import XLSX from "xlsx-js-style";
import { postTransferEnergy } from "../../api/report"; import { postTransferEnergy } from "../../api/report";
import print from "vue3-print-nb"; import print from "vue3-print-nb";
const loading = ref(false);
const radioTitle = ref("供热站"); const radioTitle = ref("供热站");
const options = reactive([]); const options = reactive([]);
const enterpriseId = ref(null); const enterpriseId = ref(null);
...@@ -276,9 +282,7 @@ function exportTableToExcel() { ...@@ -276,9 +282,7 @@ function exportTableToExcel() {
} }
} }
ws["!cols"] = [ ws["!cols"] = [{ wch: 5 }];
{ wch: 5 }
];
XLSX.utils.sheet_add_aoa(ws, [], { XLSX.utils.sheet_add_aoa(ws, [], {
origin: "A1", origin: "A1",
...@@ -294,28 +298,13 @@ function exportTableToExcel() { ...@@ -294,28 +298,13 @@ function exportTableToExcel() {
ElMessage.success("导出成功!请稍后。。。"); ElMessage.success("导出成功!请稍后。。。");
} }
function timeFun() { function timeFun() {
var date = new Date(); const today = new Date();
var year = date.getFullYear(); const preday = new Date(today);
var dateArr = [ preday.setDate(preday.getDate() - 1);
date.getMonth() + 1, today.setDate(today.getDate());
date.getDate(), enertyInfo.startTime =
date.getHours(), preday.toISOString().split("T")[0];
date.getMinutes(), enertyInfo.endTime = today.toISOString().split("T")[0];
date.getSeconds(),
];
var endTimeDay = parseInt(dateArr[1] - 1);
if (endTimeDay < 10) {
endTimeDay = "0" + endTimeDay;
}
if (dateArr[0] < 10) {
dateArr[0] = "0" + dateArr[0];
}
if (dateArr[1] < 10) {
dateArr[1] = "0" + dateArr[1];
}
enertyInfo.startTime = year + "-" + dateArr[0] + "-" + endTimeDay;
enertyInfo.endTime = year + "-" + dateArr[0] + "-" + dateArr[1];
console.log(enertyInfo);
} }
//根据权限初始化单选列表 //根据权限初始化单选列表
...@@ -360,7 +349,6 @@ function postTransferEnergyFun() { ...@@ -360,7 +349,6 @@ function postTransferEnergyFun() {
enertyInfo.jurisdictionIds.forEach((item) => { enertyInfo.jurisdictionIds.forEach((item) => {
options.forEach((item1) => { options.forEach((item1) => {
if (item1.value == item) { if (item1.value == item) {
console.log(item1.lable);
areaName.value.push(item1.lable); areaName.value.push(item1.lable);
} }
}); });
...@@ -370,12 +358,18 @@ function postTransferEnergyFun() { ...@@ -370,12 +358,18 @@ function postTransferEnergyFun() {
ElMessage.error("请选择开始时间"); ElMessage.error("请选择开始时间");
return false; return false;
} }
if (enertyInfo.endTime == null) {
ElMessage.error("请选择结束时间");
return false;
}
loading.value = true;
postTransferEnergy(enertyInfo).then((res) => { postTransferEnergy(enertyInfo).then((res) => {
if (res.success === true) { if (res.success === true) {
tableData.value = res.data; tableData.value = res.data;
} else { } else {
ElMessage.error(res.message); ElMessage.error(res.message);
} }
loading.value = false;
}); });
} }
......
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