Commit 3f7eb5d2 authored by liwei's avatar liwei

修改了bug

parent 5f6468c7
...@@ -514,4 +514,106 @@ export const tigerTigerHeatUserHis={ ...@@ -514,4 +514,106 @@ export const tigerTigerHeatUserHis={
"household": "402" "household": "402"
} }
] ]
} }
\ No newline at end of file export const cityName = {
"success": true,
"status": 0,
"message": "操作成功",
"data": [
{
"supplyName": "东部供热站",
"name": "福津园小区"
},
{
"supplyName": "东部供热站",
"name": "港益热力海雅园小区"
},
{
"supplyName": "东部供热站",
"name": "海花园小区"
},
{
"supplyName": "东部供热站",
"name": "海榕园小区低区"
},
{
"supplyName": "东部供热站",
"name": "海榕园小区高区"
},
{
"supplyName": "东部供热站",
"name": "海怡园小区低区"
},
{
"supplyName": "东部供热站",
"name": "海怡园小区高区"
},
{
"supplyName": "东部供热站",
"name": "汇德园"
},
{
"supplyName": "东部供热站",
"name": "天宸庭苑"
},
{
"supplyName": "东部供热站",
"name": "天启庭苑"
},
{
"supplyName": "福苑里供热站",
"name": "福苑里南"
},
{
"supplyName": "福苑里供热站",
"name": "天泽园"
},
{
"supplyName": "行政区供热站",
"name": "百丽学府"
},
{
"supplyName": "行政区供热站",
"name": "百丽学府高区"
},
{
"supplyName": "行政区供热站",
"name": "振业里小区"
}
]
}
export const real = {
"success": true,
"status": 0,
"message": "操作成功",
"data": [
{
"gatherTime": "2024-03-27 08:15:26",
"supplyName": "东部供热站",
"name": "汇德园",
"append": "1-1-704",
"tempTar": 21.0,
"tempHome": 16.0,
"houseType": "偏单",
"toward": "南",
"position": "客厅",
"building": "1",
"unit": "1",
"household": "704"
},
{
"gatherTime": "2024-03-27 08:15:26",
"supplyName": "东部供热站",
"name": "汇德园",
"append": "6-1-304",
"tempTar": 21.0,
"tempHome": 17.0,
"houseType": "偏单",
"toward": "南",
"position": "客厅",
"building": "6",
"unit": "1",
"household": "304"
}
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -143,7 +143,7 @@ watch( ...@@ -143,7 +143,7 @@ watch(
} }
) )
getDataNew()
function getDataNew(item) { function getDataNew(item) {
/* getListNewData(item).then(res => { /* getListNewData(item).then(res => {
if(res.total === 0){ if(res.total === 0){
......
...@@ -108,7 +108,7 @@ watch( ...@@ -108,7 +108,7 @@ watch(
} }
) )
getDataNew()
function getData(){ function getData(){
const item = reactive({ const item = reactive({
page: Page.page, page: Page.page,
......
...@@ -216,7 +216,7 @@ const handleSortChange = (data) => { ...@@ -216,7 +216,7 @@ const handleSortChange = (data) => {
Page.total = buspipelinetemperatureList.total Page.total = buspipelinetemperatureList.total
Page.rows = buspipelinetemperatureList.pageSize Page.rows = buspipelinetemperatureList.pageSize
}; };
getDataByParams()
/**序号自增*/ /**序号自增*/
function Nindex(index) { function Nindex(index) {
// 当前页数 - 1 * 每页数据条数 + 1 // 当前页数 - 1 * 每页数据条数 + 1
......
...@@ -67,7 +67,7 @@ watch( ...@@ -67,7 +67,7 @@ watch(
console.log('值ooo', props.queryParams) console.log('值ooo', props.queryParams)
} }
) )
getDataNew()
function getData() { function getData() {
/* const item = reactive({ /* const item = reactive({
page: Page.page, page: Page.page,
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
style="width: 20%" style="width: 20%"
v-loading="loading5" v-loading="loading5"
> >
<div class="echartLayer3" id="echartLayer3"></div> <div class="echartLayer3" id="echartLayer3"></div>
</el-card> </el-card>
<el-card <el-card
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
style="width: 20%" style="width: 20%"
v-loading="loading6" v-loading="loading6"
> >
<div class="echartLayer4" id="echartLayer4"></div> <div class="echartLayer4" id="echartLayer4"></div>
</el-card> </el-card>
<el-card <el-card
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
style="width: 20%" style="width: 20%"
v-loading="loading7" v-loading="loading7"
> >
<div class="echartLayer5" id="echartLayer5"></div> <div class="echartLayer5" id="echartLayer5"></div>
</el-card> </el-card>
<el-card <el-card
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
style="width: 20%" style="width: 20%"
v-loading="loading8" v-loading="loading8"
> >
<div class="echartLayer6" id="echartLayer6"></div> <div class="echartLayer6" id="echartLayer6"></div>
</el-card> </el-card>
</div> </div>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
style="width: 25%" style="width: 25%"
v-loading="loading9" v-loading="loading9"
> >
<div class="echartLayer7" id="echartLayer7"></div> <div class="echartLayer7" id="echartLayer7"></div>
</el-card> </el-card>
<el-card <el-card
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
style="width: 25%" style="width: 25%"
v-loading="loading10" v-loading="loading10"
> >
<div class="echartLayer8" id="echartLayer8"></div> <div class="echartLayer8" id="echartLayer8"></div>
</el-card> </el-card>
<el-card <el-card
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
style="width: 25%" style="width: 25%"
v-loading="loading11" v-loading="loading11"
> >
<div class="echartLayer9" id="echartLayer9"></div> <div class="echartLayer9" id="echartLayer9"></div>
</el-card> </el-card>
<el-card <el-card
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
style="width: 25%" style="width: 25%"
v-loading="loading12" v-loading="loading12"
> >
<div class="echartLayer10" id="echartLayer10"></div> <div class="echartLayer10" id="echartLayer10"></div>
</el-card> </el-card>
</div> </div>
...@@ -398,62 +398,62 @@ const timeV = ref(""); ...@@ -398,62 +398,62 @@ const timeV = ref("");
const selTimeF = ref(true); const selTimeF = ref(true);
//能耗总览页---概况接口 //能耗总览页---概况接口
function postArealistFun() { function postArealistFun() {
loading13.value = true; // loading13.value = true;
postArealist().then((res) => { // postArealist().then((res) => {
if (res.success === true) { // if (res.success === true) {
areaList.supplyYear = res.data[0].supplyYear; // areaList.supplyYear = res.data[0].supplyYear;
areaList.runDay = res.data[0].runDay; // areaList.runDay = res.data[0].runDay;
areaList.heArea = res.data[0].heArea; // areaList.heArea = res.data[0].heArea;
areaList.gasArea = res.data[0].gasArea; // areaList.gasArea = res.data[0].gasArea;
areaList.transferCount = res.data[0].transferCount; // areaList.transferCount = res.data[0].transferCount;
areaList.userCount = res.data[0].userCount; // areaList.userCount = res.data[0].userCount;
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading13.value = false; // loading13.value = false;
postGYPipeRealFun(); // postGYPipeRealFun();
postGYCompanyEnergyFun(); // postGYCompanyEnergyFun();
}); // });
} }
function postGYPipeRealFun() { function postGYPipeRealFun() {
loading1.value = true; // loading1.value = true;
postGYPipeReal().then((res) => { // postGYPipeReal().then((res) => {
if (res.success === true) { // if (res.success === true) {
gYPipeReal.value = res.data; // gYPipeReal.value = res.data;
} else { // } else {
loading.value = false; // loading.value = false;
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading1.value = false; // loading1.value = false;
postAllHeatFun(); // postAllHeatFun();
}); // });
} }
function postAllHeatFun() { function postAllHeatFun() {
loading14.value = true; // loading14.value = true;
postAllHeat().then((res) => { // postAllHeat().then((res) => {
if (res.success === true) { // if (res.success === true) {
allHeat.value = res.data[0]; // allHeat.value = res.data[0];
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading14.value = false; // loading14.value = false;
postGYWeatherFun(); // postGYWeatherFun();
}); // });
} }
function postGYCompanyEnergyFun() { function postGYCompanyEnergyFun() {
loading2.value = true; loading2.value = true;
postGYCompanyEnergy(params).then((res) => { // postGYCompanyEnergy(params).then((res) => {
if (res.success === true) { // if (res.success === true) {
gYCompanyEnergy.value = res.data[0]; // gYCompanyEnergy.value = res.data[0];
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading2.value = false; // loading2.value = false;
gYCompanyEnergyInit.value = true; // gYCompanyEnergyInit.value = true;
}); // });
} }
//近七日气象趋势 //近七日气象趋势
...@@ -1723,4 +1723,4 @@ ul.titinfoM li span { ...@@ -1723,4 +1723,4 @@ ul.titinfoM li span {
height: 78vh; height: 78vh;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -387,12 +387,12 @@ function postExternalQOQFun() { ...@@ -387,12 +387,12 @@ function postExternalQOQFun() {
}; };
clearData(); clearData();
if (networkType.value == 2) { if (networkType.value == 2) {
console.log('externalQOQ:',externalQOQ)
console.log('externalQOQ.data.hourWater:',externalQOQ.data.hourWater)
// 静态数据 // 静态数据
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
pageInitFun(externalQOQ) pageInitFun(externalQOQ);
tableData = externalQOQ.data.hourWater tableData = externalQOQ.data.hourWater;
// postExternalQOQ(params).then((res) => { // postExternalQOQ(params).then((res) => {
// echarts.dispose(document.getElementById("echartsLayer")); // echarts.dispose(document.getElementById("echartsLayer"));
// if (res.success === true) { // if (res.success === true) {
...@@ -434,6 +434,7 @@ function clearData() { ...@@ -434,6 +434,7 @@ function clearData() {
} }
function pageInitFun(res) { function pageInitFun(res) {
console.log('res:',res)
tableData.length = 0; tableData.length = 0;
res.data.hourWater.forEach((element) => { res.data.hourWater.forEach((element) => {
let tableArr = { let tableArr = {
...@@ -450,6 +451,7 @@ function pageInitFun(res) { ...@@ -450,6 +451,7 @@ function pageInitFun(res) {
echartSeries.length = 0; echartSeries.length = 0;
echartDataLegend.length = 0; echartDataLegend.length = 0;
echartDataTime.length = 0; echartDataTime.length = 0;
console.log('res:',res)
echartData.value = dataDeal(res.data.hourWater); echartData.value = dataDeal(res.data.hourWater);
echartData.value[0].listInfo.forEach((element) => { echartData.value[0].listInfo.forEach((element) => {
if (element.gatherTime) { if (element.gatherTime) {
...@@ -670,4 +672,4 @@ onUnmounted(() => { ...@@ -670,4 +672,4 @@ onUnmounted(() => {
.el-form-item__content { .el-form-item__content {
align-items: right !important; align-items: right !important;
} }
</style> </style>
\ No newline at end of file
...@@ -138,6 +138,20 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs"; ...@@ -138,6 +138,20 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { saveAs } from "file-saver"; import { saveAs } from "file-saver";
import XLSX from "xlsx-js-style"; import XLSX from "xlsx-js-style";
import {
TransferEnergyView1,
TransferEnergyView2,
TransferEnergyView3,
TransferEnergyView4,
TransferEnergyView5,
TransferEnergyView6,
TransferEnergyView7,
TransferEnergyView8,
TransferEnergyView9,
TransferEnergyView10,
TransferEnergyView11,
TransferEnergyView12,
} from '../../dataJson/mock-data/mock'
import { import {
postQOQlist, postQOQlist,
postHeatUct, postHeatUct,
...@@ -444,168 +458,168 @@ function postQOQlistFun() { ...@@ -444,168 +458,168 @@ function postQOQlistFun() {
//换热站机组能耗数据接口(热单耗) //换热站机组能耗数据接口(热单耗)
function postHeatUctFun() { function postHeatUctFun() {
loading.value = true; loading.value = true;
postHeatUct(enertyInfo).then((res) => { // postHeatUct(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
// postHeatUct(params).then((res) => { // postHeatUct(params).then((res) => {
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView1);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(电单耗) //换热站机组能耗数据接口(电单耗)
function postElecUcFun() { function postElecUcFun() {
loading.value = true; loading.value = true;
postElecUc(enertyInfo).then((res) => { // postElecUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView2);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(水单耗) //换热站机组能耗数据接口(水单耗)
function postWaterUcFun() { function postWaterUcFun() {
loading.value = true; // loading.value = true;
postWaterUc(enertyInfo).then((res) => { // postWaterUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView3);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(度日数热耗) //换热站机组能耗数据接口(度日数热耗)
function postDayHeatFun() { function postDayHeatFun() {
loading.value = true; loading.value = true;
postDayHeat(enertyInfo).then((res) => { // postDayHeat(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView4);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(一网回温) //换热站机组能耗数据接口(一网回温)
function postFirBackTFun() { function postFirBackTFun() {
loading.value = true; loading.value = true;
postFirBackT(enertyInfo).then((res) => { // postFirBackT(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView5);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(一网万平米流量) //换热站机组能耗数据接口(一网万平米流量)
function postWPMLLFun() { function postWPMLLFun() {
loading.value = true; loading.value = true;
postWPMLL(enertyInfo).then((res) => { // postWPMLL(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView6);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(一网万平米流量) //换热站机组能耗数据接口(一网万平米流量)
function postHeatEffiUcFun() { function postHeatEffiUcFun() {
loading.value = true; loading.value = true;
postHeatEffiUc(enertyInfo).then((res) => { // postHeatEffiUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView7);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(二网温差) //换热站机组能耗数据接口(二网温差)
function postSecAbsTUcFun() { function postSecAbsTUcFun() {
loading.value = true; loading.value = true;
postSecAbsTUc(enertyInfo).then((res) => { // postSecAbsTUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView8);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(换热站二网均温) //换热站机组能耗数据接口(换热站二网均温)
function postSecAvgTUcFun() { function postSecAvgTUcFun() {
loading.value = true; loading.value = true;
postSecAvgTUc(enertyInfo).then((res) => { // postSecAvgTUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView9);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
//换热站机组能耗数据接口(二网万平米流量) //换热站机组能耗数据接口(二网万平米流量)
function postSecTrafficUcFun() { function postSecTrafficUcFun() {
loading.value = true; loading.value = true;
postSecTrafficUc(enertyInfo).then((res) => { // postSecTrafficUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView10);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
function postFirEffiTrendUcFun() { function postFirEffiTrendUcFun() {
loading.value = true; loading.value = true;
postFirEffiTrendUc(enertyInfo).then((res) => { // postFirEffiTrendUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView11);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
function postSecEffiTrendUcFun() { function postSecEffiTrendUcFun() {
loading.value = true; loading.value = true;
postSecEffiTrendUc(enertyInfo).then((res) => { // postSecEffiTrendUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer")); echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) { // if (res.success === true) {
pageInitFun(res); pageInitFun(TransferEnergyView12);
} else { // } else {
ElMessage.error(res.message); // ElMessage.error(res.message);
} // }
loading.value = false; loading.value = false;
}); // });
} }
function pageInitFun(res) { function pageInitFun(res) {
...@@ -845,4 +859,4 @@ onUnmounted(() => { ...@@ -845,4 +859,4 @@ onUnmounted(() => {
.el-form-item__content { .el-form-item__content {
align-items: right !important; align-items: right !important;
} }
</style> </style>
\ No newline at end of file
...@@ -226,7 +226,7 @@ import { ref, reactive, onMounted, onUnmounted, provide, computed, handleError } ...@@ -226,7 +226,7 @@ import { ref, reactive, onMounted, onUnmounted, provide, computed, handleError }
import DataForm from '../../components/DataForm.vue'; import DataForm from '../../components/DataForm.vue';
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import http from '../../api/http' import http from '../../api/http'
import {tigerTigerHeatUserGetName,tigerTigerHeatUserReal,tigerTigerHeatUserHis} from '@/dataJson/exchangeStation/hotUser/hotUser.js' import {tigerTigerHeatUserGetName,tigerTigerHeatUserReal,tigerTigerHeatUserHis,real} from '../../dataJson/exchangeStation/hotUser/hotUser.js'
import store from "../../store/index"; import store from "../../store/index";
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { import {
...@@ -435,15 +435,15 @@ async function initHis() { ...@@ -435,15 +435,15 @@ async function initHis() {
//获得数据 //获得数据
async function getRealData() { async function getRealData() {
loading.value = true loading.value = true
await http.post(dataUrl).then((result) => { // await http.post(dataUrl).then((result) => {
if (result.status === 0) { if (real.status === 0) {
//处理返回数据 //处理返回数据
tableInfo.realData = result.data; tableInfo.realData = real.data;
setshowData(); setshowData();
} else { } else {
tableInfo.tableData.length = 0; tableInfo.tableData.length = 0;
} }
}) // })
loading.value = false loading.value = false
} }
...@@ -628,11 +628,11 @@ function SearchHisData() { ...@@ -628,11 +628,11 @@ function SearchHisData() {
//导出数据 //导出数据
function ExportDataFile(){ function ExportDataFile(){
if (isHisData.value) { // if (isHisData.value) {
ExportHisDataFile(); // ExportHisDataFile();
} else { // } else {
ExportRealDataFile(); // ExportRealDataFile();
} // }
} }
//实时数据导出 //实时数据导出
......
...@@ -10,16 +10,16 @@ ...@@ -10,16 +10,16 @@
@change="changeData" /> @change="changeData" />
</div> </div>
</div> </div>
<div class="div-dropdown text-center"> <div class="div-dropdown text-center">
<el-form-item label="小区名称:"> <el-form-item label="小区名称:">
<el-cascader :options="DataInfo.tree" v-model="DataInfo.name" :props="props" collapse-tags <el-cascader :options="DataInfo.tree" v-model="DataInfo.name" :props="props" collapse-tags
clearable :show-all-levels="false" filterable placeholder="请选择" style="min-width: 280px;" /> clearable :show-all-levels="false" filterable placeholder="请选择" style="min-width: 280px;" />
</el-form-item> </el-form-item>
</div> </div>
<el-col :span="10"> <el-col :span="10">
<div class="div-time-picker" v-show="isHisData"> <div class="div-time-picker" v-show="isHisData">
<el-form-item label="开始时间:" style="margin-right: 20px;"> <el-form-item label="开始时间:" style="margin-right: 20px;">
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<el-col :span="6"> <el-col :span="6">
<el-button class="el-button-button" type="primary" :span="6" @click="ExportDataFile" > <el-button class="el-button-button" type="primary" :span="6" @click="ExportDataFile" >
导出</el-button> 导出</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</el-col> </el-col>
...@@ -193,8 +193,8 @@ ...@@ -193,8 +193,8 @@
padding-top: 7px; padding-top: 7px;
height: 50px; height: 50px;
padding-left: 10px; padding-left: 10px;
.el-dropdown-link { .el-dropdown-link {
margin-top: 5px; margin-top: 5px;
color: white; color: white;
...@@ -225,7 +225,8 @@ ...@@ -225,7 +225,8 @@
import { ref, reactive, onMounted, onUnmounted, provide, computed, handleError } from 'vue' import { ref, reactive, onMounted, onUnmounted, provide, computed, handleError } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import http from '../../api/http' import http from '../../api/http'
import {tigerTigerTapDataHis,tigerTapDataReal} from '@/dataJson/exchangeStation/valve/valve.js' import {tigerTigerTapDataHis,tigerTapDataReal} from '../../dataJson/exchangeStation/valve/valve.js'
import {cityName} from '../../dataJson/exchangeStation/hotUser/hotUser'
import store from "../../store/index"; import store from "../../store/index";
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// import { da } from 'element-plus/es/locale'; // import { da } from 'element-plus/es/locale';
...@@ -251,7 +252,7 @@ var dateArr = [ ...@@ -251,7 +252,7 @@ var dateArr = [
date.getHours(), date.getHours(),
date.getMinutes(), date.getMinutes(),
date.getSeconds(), date.getSeconds(),
date.getDate() date.getDate()
]; ];
for (var i = 0; i < dateArr.length; i++) { for (var i = 0; i < dateArr.length; i++) {
if (dateArr[i] >= 1 && dateArr[i] <= 9) { if (dateArr[i] >= 1 && dateArr[i] <= 9) {
...@@ -337,7 +338,7 @@ function twoDigits(value) { ...@@ -337,7 +338,7 @@ function twoDigits(value) {
function disabledDate(thisdate){ function disabledDate(thisdate){
var startDate=new Date(2023,7,1); var startDate=new Date(2023,7,1);
var endDate=new Date(); var endDate=new Date();
return thisdate > endDate || thisdate < startDate; return thisdate > endDate || thisdate < startDate;
} }
...@@ -473,18 +474,18 @@ async function getHisData() { ...@@ -473,18 +474,18 @@ async function getHisData() {
//获得小区数据 //获得小区数据
async function getName() { async function getName() {
loading.value = true // loading.value = true
await http.post('/api/tiger/TigerHeatUser/GetName').then((result) => { // await http.post('/api/tiger/TigerHeatUser/GetName').then((result) => {
if (result.status === 0) { if (cityName.status === 0) {
//处理返回数据 //处理返回数据
var list = []; var list = [];
//供热站--小区 //供热站--小区
result.data.forEach(data => { cityName.data.forEach(data => {
list.push({supplyName:data.supplyName,name:data.name}); list.push({supplyName:data.supplyName,name:data.name});
}) })
setSelect(list) setSelect(list)
} }
}) // })
loading.value = false loading.value = false
} }
...@@ -512,7 +513,7 @@ async function getHisDataByInfo(name, start, end, startPage, pagesCount, sort) { ...@@ -512,7 +513,7 @@ async function getHisDataByInfo(name, start, end, startPage, pagesCount, sort) {
setshowData(); setshowData();
// makeFormsData(result.data.realData); // makeFormsData(result.data.realData);
loading.value = false loading.value = false
} }
function ExportHisDataByInfo(name, start, end, startPage, pagesCount, sort){ function ExportHisDataByInfo(name, start, end, startPage, pagesCount, sort){
...@@ -632,11 +633,11 @@ function SearchHisData() { ...@@ -632,11 +633,11 @@ function SearchHisData() {
//导出数据 //导出数据
function ExportDataFile(){ function ExportDataFile(){
if (isHisData.value) { // if (isHisData.value) {
ExportHisDataFile(); // ExportHisDataFile();
} else { // } else {
ExportRealDataFile(); // ExportRealDataFile();
} // }
} }
//实时数据导出 //实时数据导出
...@@ -684,7 +685,7 @@ function getFileName(name){ ...@@ -684,7 +685,7 @@ function getFileName(name){
const hours = now.getHours().toString().padStart(2, '0'); const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0'); const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0'); const seconds = now.getSeconds().toString().padStart(2, '0');
return name+`_${year}${month}${day}${hours}${minutes}${seconds}.xls`; return name+`_${year}${month}${day}${hours}${minutes}${seconds}.xls`;
} }
...@@ -781,4 +782,4 @@ function sortMethod({ order, prop }) { ...@@ -781,4 +782,4 @@ function sortMethod({ order, prop }) {
//页面载入 //页面载入
init(); init();
</script> </script>
\ No newline at end of file
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