Commit 00f525ab authored by 王亚晖's avatar 王亚晖
parents 7fa491c4 2647dee0
......@@ -78,6 +78,20 @@ export const postSecTrafficUc = params => {
})
}
//板换效率趋势一
export const postFirEffiTrendUc = params => {
return http.post(`/api/analysis/external/FirEffiTrendUc`, params).then(res => res).catch(function (error) {
console.log(error);
})
}
//板换效率趋势二
export const postSecEffiTrendUc = params => {
return http.post(`/api/analysis/external/SecEffiTrendUc`, params).then(res => res).catch(function (error) {
console.log(error);
})
}
//热量分析报表
export const postHeatAnalysis = params => {
return http.post(`/api/analysis/report/HeatAnalysis`, params).then(res => res).catch(function (error) {
......
<template>
<el-scrollbar>
<div class="ams-el-menu">
<!-- <div class="menu-search">
<el-select placement="bottom" v-model="searchValue" clearable filterable remote reserve-keyword
:placeholder="'请输入关键字搜索...'" :remote-method="remoteMethod" @change="selectChange" :loading="loading">
<div class="menu-search">
<el-select placement="bottom" v-model="searchValue" clearable filterable
:placeholder="'请输入关键字搜索...'" @change="save(searchValue)">
<template #prefix><i class="el-icon-search"></i></template>
<el-option v-for="item in menus" :key="item.menuId" :label="item.menuName" :value="item.menuName" />
<el-option v-for="item in options" :key="item.menuId" :label="item.menuName" :value="item.navigateUrl" />
</el-select>
</div> -->
</div>
<el-menu unique-opened :collapse-transition='false' :collapse='$store.state.iscollapse' router :default-active="defaultActive" active-text-color="#409EFF" background-color="#32363f" text-color="#fff">
<!-- 一级菜单 -->
......@@ -78,15 +78,28 @@
import {
Menu as IconMenu
} from '@element-plus/icons-vue'
import { useRouter } from 'vue-router';
// const searchValue = ref('');
// const proxy = getCurrentInstance();
// const props = defineProps(['meun', 'thisIndex']);
// const emit = defineEmits(['subEvent']);
// const options = ref([]);
// const loading = ref(false);
const searchValue = ref();
const router = useRouter();
const options = ref([]);
const store = useStore()
setTimeout(() => {
getoptions(); // 调用你的函数
}, 2000);
function getoptions(){
var menus = store.state.menus;
for(let i = 0;i < 100;i++){
if(menus[i] === undefined)break;
for(let j = 0;j < 100;j++){
if(menus[i].childs[j] === undefined)break;
options.value.push(menus[i].childs[j])
}
}
}
//定义默认展开
let defaultActive = ref('/home')
......@@ -116,4 +129,10 @@
window.sessionStorage.setItem('activePath',path)
}
const save=(routePath)=>{
defaultActive.value=routePath
window.sessionStorage.setItem('activePath',routePath)
router.push({ path: routePath});
}
</script>
\ No newline at end of file
<template>
<div
class="contentBlock"
id="contentBlock"
v-loading="loading"
element-loading-background="rgba(122, 122, 122, 0.6)"
>
<div class="contentBlock" id="contentBlock">
<div class="contentBlockInn" v-if="pageInit">
<div class="flexBlock">
<el-card class="card-contianer" style="width: 46%">
......@@ -85,6 +80,7 @@
style="width: 90%"
format="YYYY-MM-DD HH:mm:ss"
time-format="HH:mm:ss"
unlink-panels
@change="seltimeFun"
:disabled="selTimeF"
/>
......@@ -152,26 +148,34 @@
</table>
</el-card>
<el-card class="card-contianer subTitBlockM" style="width: 33%">
<div v-if="gYCompanyEnergyInit">
<div
style="font-size: 120%; text-align: center; font-weight: bolder"
style="
font-size: 120%;
text-align: center;
font-weight: bolder;
"
>
{{ gYCompanyEnergy.value.enterpriseName }}
</div>
<table cellpadding="0" cellspacing="0">
<table cellpadding="0" cellspacing="0" style="margin-top: 15%">
<tr>
<td style="width: 60px">热耗</td>
<td>
<div>
<span
>{{ gYCompanyEnergy.value.heatUc.toFixed(4) }}W/㎡</span
>{{
gYCompanyEnergy.value.heatUc.toFixed(4)
}}W/㎡</span
>
</div>
<!-- <div><span>40W/㎡</span></div> -->
</td>
<td>水耗</td>
<td>
<span
>{{ gYCompanyEnergy.value.waterUc.toFixed(2) }}kg/㎡</span
>{{
gYCompanyEnergy.value.waterUc.toFixed(2)
}}kg/㎡</span
>
</td>
</tr>
......@@ -198,11 +202,14 @@
<td>电耗</td>
<td>
<span
>{{ gYCompanyEnergy.value.elecUc.toFixed(4) }}WH/㎡</span
>{{
gYCompanyEnergy.value.elecUc.toFixed(4)
}}WH/㎡</span
>
</td>
</tr>
</table>
</div>
</el-card>
<el-card class="card-contianer" style="width: 33%">
<div class="echartLayer1" id="echartLayer1"></div>
......@@ -312,6 +319,7 @@ import {
} from "../../api/overview";
let timerID = ref();
const pageInit = ref(false);
const gYCompanyEnergyInit = ref(false);
const areaList = reactive({
supplyYear: "2024-2025",
runDay: 0,
......@@ -353,6 +361,7 @@ function postArealistFun() {
ElMessage.error(res.message);
}
postGYPipeRealFun();
postGYCompanyEnergyFun();
});
}
......@@ -376,19 +385,19 @@ function postAllHeatFun() {
loading.value = false;
ElMessage.error(res.message);
}
postGYCompanyEnergyFun();
//postGYCompanyEnergyFun();
postGYWeatherFun();
});
}
function postGYCompanyEnergyFun() {
postGYCompanyEnergy().then((res) => {
postGYCompanyEnergy(params).then((res) => {
if (res.success === true) {
gYCompanyEnergy.value = res.data[0];
} else {
loading.value = false;
ElMessage.error(res.message);
}
postGYWeatherFun();
gYCompanyEnergyInit.value = true;
});
}
......
......@@ -88,28 +88,11 @@
<el-option label="换热站板换效率" :value="7" />
<el-option label="换热站二网均温" :value="8" />
<el-option label="二网温差" :value="9" />
<el-option label="二网均温" :value="8" />
<el-option label="二网万平米流量" :value="11" />
<el-option label="板换效率趋势一" :value="12" />
<el-option label="板换效率趋势二" :value="13" />
</el-select>
</el-form-item>
<!-- <el-form-item label="用量环比类型" v-show="energyTypeDis">
<el-select
v-model="enertyInfo.energyType"
placeholder="请选择"
>
<el-option label="耗水" :value="2" />
<el-option label="耗热" :value="3" />
<el-option label="耗电" :value="4" />
</el-select>
</el-form-item> -->
<!-- <el-form-item>
<el-button type="primary" @click="sendClick" style="margin: 15px 0 0 0;">查询</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="exportTableToExcel" style="margin: 15px 0 0 0;"
>导出表格</el-button
>
</el-form-item> -->
<div style="position: absolute; right: 2%">
<el-button
type="primary"
......@@ -168,6 +151,8 @@ import {
postSecAvgTUc,
postSecAbsTUc,
postSecTrafficUc,
postFirEffiTrendUc,
postSecEffiTrendUc,
} from "../../api/analysis";
const options = reactive([]);
const enterpriseId = ref();
......@@ -260,7 +245,7 @@ function exportTableToExcel() {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8",
});
const downloadUrl = URL.createObjectURL(dataBlob);
saveAs(dataBlob, "tableData.xlsx");
saveAs(dataBlob, "换热站趋势图.xlsx");
ElMessage.success("导出成功!请稍后。。。");
}
......@@ -410,6 +395,12 @@ function sendClick() {
case 11:
postSecTrafficUcFun(); //二网万平米流量
break;
case 12:
postFirEffiTrendUcFun();
break;
case 13:
postSecEffiTrendUcFun();
break;
}
enertyTab.value = "能耗值(" + company.value + ")";
} else {
......@@ -621,6 +612,36 @@ function postSecTrafficUcFun() {
});
}
function postFirEffiTrendUcFun() {
tabloading.value = true;
postFirEffiTrendUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
} else if (res.status == 9) {
setInterval(function () {
tabloading.value = false;
this.postFirEffiTrendUcFun();
}, 600000);
}
});
}
function postSecEffiTrendUcFun() {
tabloading.value = true;
postSecEffiTrendUc(enertyInfo).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
pageInitFun(res);
} else if (res.status == 9) {
setInterval(function () {
tabloading.value = false;
this.postFirEffiTrendUcFun();
}, 600000);
}
});
}
function pageInitFun(res) {
tableData.length = 0;
res.data.hourWater.forEach((element) => {
......
......@@ -59,7 +59,6 @@
collapse-tags
:show-all-levels="false"
placeholder="请选择"
@change="transferIdChange"
/>
</el-form-item>
<el-form-item label="开始月份" v-show="enertyInfo.interval == 1">
......@@ -351,12 +350,6 @@ function getEnterprise() {
}
}
function transferIdChange() {
// if (enertyInfo.transferId.length > 10) {
// ElMessage.error("换热机组最多只能选择10个");
// }
}
function exportTableToExcel() {
let arr = [];
let exlData = [];
......@@ -379,7 +372,6 @@ function exportTableToExcel() {
}
);
worksheet["!cols"] = [{ wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 20 }];
// worksheet["!rows"] = [{ hpx: 20 }];
worksheet["A1"].s = {
fill: {
......@@ -513,6 +505,10 @@ function postExternalYOYFun() {
ElMessage.error("开始日期不能晚于或等于结束日期");
return false;
}
if ((endDay.value - startDay.value) > 6) {
ElMessage.error("查询日期区间不能超过7天");
return false;
}
let dayArr = [];
let dayn = endDay.value - startDay.value;
let startDayn = startDay.value;
......
......@@ -118,7 +118,12 @@
<el-table
:data="tableData"
empty-text="暂无数据"
class="eltable"
style="width: 100%; margin-top: 10px"
:summary-method="getSummaries"
show-summary
stripe
:header-cell-style="{ backgroundColor: '#dfe8f6', color: '#213547' }"
>
<el-table-column type="index" width="60" label="序号" align="center">
</el-table-column>
......@@ -530,4 +535,17 @@ table.botList td {
height: auto !important;
}
}
.eltable {
height: 64vh;
}
@media (min-width: 1700px) {
.eltable {
height: 72vh;
}
}
@media (min-width: 2560px) {
.eltable {
height: 79vh;
}
}
</style>
\ No newline at end of file
......@@ -13,58 +13,59 @@
style="background-color: #99bbe8"
>
<tr>
<th width="25%">
<span>记录时间</span>
<th>
<span>打印时间</span>
</th>
<th style="text-align: left; background-color: #ffffff">
<el-config-provider :locale="zhCn">
<el-date-picker
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
type="date"
value-format="YYYY-MM-DD"
placeholder="选择查询时间"
style="width: 180px"
v-model="enertyInfo.queryTime"
v-model="enertyInfo.printTime"
/>
</el-config-provider>
</th>
<th width="25%">
<th>
<el-button
type="primary"
style="min-width: 70px"
@click="postHeatForecastFun"
class="printHidden"
v-show="printHidden"
>历史查询</el-button
@click="postPrintHeatForecastFun"
>打印查询</el-button
>
</th>
</tr>
<tr>
<th>
<span>打印时间</span>
<th width="25%">
<span>记录时间</span>
</th>
<th style="text-align: left; background-color: #ffffff">
<el-config-provider :locale="zhCn">
<el-date-picker
type="date"
value-format="YYYY-MM-DD"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择查询时间"
style="width: 180px"
v-model="enertyInfo.printTime"
v-model="enertyInfo.queryTime"
/>
</el-config-provider>
</th>
<th>
<th width="25%">
<el-button
type="primary"
style="min-width: 70px"
@click="postHeatForecastFun"
class="printHidden"
v-show="printHidden"
@click="postPrintHeatForecastFun"
>打印查询</el-button
>历史查询</el-button
>
</th>
</tr>
</table>
<div class="overflowBlock">
<table
cellpadding="0"
cellspacing="1"
......@@ -248,6 +249,7 @@
<td>领导:</td>
</tr>
</table>
</div>
<div>
<div class="btngrounp printHidden" v-show="printHidden">
<el-button
......@@ -720,7 +722,7 @@ function postPrintHeatForecastFun() {
weather.value = {};
dataList.value = {};
dataTime.value = {};
ElMessage.error(res.message);
ElMessage.error("没有获取到打印记录");
}
loading.value = false;
});
......@@ -765,12 +767,11 @@ onUnmounted(() => {});
</script>
<style lang="less" scoped>
.contentBlock {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ffffff;
}
.overflowBlock {
width: 100%;
height: 60vh;
overflow: auto;
}
table {
......@@ -829,4 +830,14 @@ table.botList td {
height: auto !important;
}
}
@media (min-width: 1700px) {
.overflowBlock {
height: 67vh;
}
}
@media (min-width: 2560px) {
.overflowBlock {
height: 100%;
}
}
</style>
\ No newline at end of file
......@@ -40,10 +40,15 @@
@click="postHeatAnalysisFun"
>历史查询</el-button
>
<el-button type="primary" v-print="printObj">打印</el-button>
<el-button type="primary" @click="exportTableToExcel"
>导出</el-button
>
</div>
</th>
</tr>
</table>
<div class="overflowBlock">
<table
cellpadding="0"
cellspacing="1"
......@@ -69,7 +74,9 @@
<tr>
<th>预测室外平均温度(℃)</th>
<td>
{{ predictionTemp.avgTemp ? predictionTemp.avgTemp : "-" }}
{{
predictionTemp.avgTemp ? predictionTemp.avgTemp : "-"
}}
</td>
</tr>
<tr>
......@@ -322,26 +329,6 @@
</tr>
</template>
</table>
<div class="printHidden">
<div class="btngrounp">
<el-button
type="primary"
style="margin: 15px 0 0 0"
v-print="printObj"
>打印</el-button
>
<!--<el-button
type="primary"
style="margin: 15px 0 0 10px"
>打印预览</el-button
-->
<el-button
type="primary"
@click="exportTableToExcel"
style="margin: 15px 0 0 10px"
>导出</el-button
>
</div>
</div>
</el-card>
</div>
......@@ -877,12 +864,11 @@ onUnmounted(() => {});
</script>
<style lang="less" scoped>
.contentBlock {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ffffff;
}
.overflowBlock {
width: 100%;
height: 68vh;
overflow: auto;
}
table {
......@@ -930,4 +916,14 @@ table td {
height: auto !important;
}
}
@media (min-width: 1700px) {
.overflowBlock {
height: 74vh;
}
}
@media (min-width: 2560px) {
.overflowBlock {
height: 100%;
}
}
</style>
\ No newline at end of file
......@@ -57,12 +57,6 @@
style="margin: 15px 0 0 10px"
>打印</el-button
>
<!--<el-button
type="primary"
@click="exportTableToExcel"
style="margin: 15px 0 0 10px"
>打印预览</el-button
>-->
<el-button
type="primary"
@click="exportTableToExcel"
......@@ -97,7 +91,15 @@
</td>
</tr>
</table>
<el-table :data="tableData" style="width: 100%; margin-top: 10px">
<el-table
:data="tableData"
style="width: 100%; margin-top: 10px"
class="eltable"
:summary-method="getSummaries"
show-summary
stripe
:header-cell-style="{ backgroundColor: '#dfe8f6', color: '#213547' }"
>
<el-table-column prop="sn" label="序号" width="60" align="center" />
<el-table-column prop="jurisdictionName" label="片区" />
<el-table-column prop="transferName" label="换热站名称" />
......@@ -121,7 +123,7 @@
id="exlBlock"
cellpadding="0"
cellspacing="1"
style="margin-top: 5px; background-color: #99bbe8"
style="margin-top: 5px"
>
<tr>
<td colspan="2">起始时间:{{ enertyInfo.startTime }}</td>
......@@ -302,8 +304,7 @@ function timeFun() {
const preday = new Date(today);
preday.setDate(preday.getDate() - 1);
today.setDate(today.getDate());
enertyInfo.startTime =
preday.toISOString().split("T")[0];
enertyInfo.startTime = preday.toISOString().split("T")[0];
enertyInfo.endTime = today.toISOString().split("T")[0];
}
......@@ -365,7 +366,12 @@ function postTransferEnergyFun() {
loading.value = true;
postTransferEnergy(enertyInfo).then((res) => {
if (res.success === true) {
tableData.value = res.data;
res.data.forEach((item, index) => {
item.area = item.area.toFixed(4);
if (item.transferName != "总计") {
tableData.value.push(item);
}
});
} else {
ElMessage.error(res.message);
}
......@@ -403,13 +409,7 @@ onUnmounted(() => {});
</script>
<style lang="less" scoped>
.contentBlock {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ffffff;
overflow: auto;
}
table {
width: 100%;
......@@ -465,4 +465,17 @@ table.botList td {
height: auto !important;
}
}
.eltable {
height: 60vh;
}
@media (min-width: 1700px) {
.eltable {
height: 68vh;
}
}
@media (min-width: 2560px) {
.eltable {
height: 76vh;
}
}
</style>
\ No newline at end of file
<template>
<div id="ams-container">
<div id="ams-container" @click="closeContextMenu">
<div class="ams-aside" :style="{ width: menuWidth + 'px' }">
<div class="header" :style="{ width: menuWidth - 1 + 'px' }">
<img
......@@ -292,6 +292,7 @@
class="demo-tabs mytab"
@tab-remove="removeTab"
@tab-change="changeTabsHandle"
@contextmenu.prevent.native="openContextMenu($event)"
>
<el-tab-pane
:closable="item.path !== '/RealSupply'"
......@@ -302,6 +303,16 @@
>
</el-tab-pane>
</el-tabs>
<ul
v-show="contextMenuVisible"
:style="{left:left+'px',top:top+'px'}"
class="contextmenu"
>
<li @click="closeAllTabs">关闭所有</li>
<li @click="closeLeftTabs()">关闭左边</li>
<li @click="closeRigthTabs()">关闭右边</li>
<li @click="closeOtherTabs()">关闭其他</li>
</ul>
</div>
<div :style="{ height: mainHeight + 'px' }">
<!--, width: mainWidth +'px' -->
......@@ -353,6 +364,29 @@
background-color: #0065d5;
color: #ffffff;
}
.contextmenu {
width: 100px;
margin: 0;
border: 1px solid #ccc;
background: #fff;
z-index: 3000;
position: absolute;
list-style-type: none;
padding: 5px 0;
border-radius: 4px;
font-size: 14px;
color: #333;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.2);
}
.contextmenu li {
margin: 0;
padding: 7px 16px;
}
.contextmenu li:hover {
background: #f2f2f2;
cursor: pointer;
}
</style>
<script lang="ts">
......@@ -607,7 +641,6 @@ export default defineComponent({
//标签删除函数
const removeTab = (path) => {
console.log(path);
let isTabs = activeTable.value;
const tabs = editableTabs.value;
//删除的是 激活菜单,将激活选项设为 上一个或下一个标签的 path
......@@ -799,7 +832,7 @@ export default defineComponent({
http
.post("/api/alarm/GetAlarmMsg", AlarmInfo.value, false)
.then((result) => {
if (result.data !== null && sta.value === 0) {
if (result.data.lenth === 0 && sta.value === 0) {
sta.value = 1;
title.value = result.data[0].title;
msg.value = result.data[0].msg;
......@@ -832,7 +865,7 @@ export default defineComponent({
}
function countalarm() {
http.post("/api/alarm/GetAlarmMsg", AlarmInfo.value).then((result) => {
if (result.data !== null && consta.value === 0) {
if (result.data.lenth === 0 && consta.value === 0) {
consta.value = 1;
counttitle.value = result.data[1].title;
countmsg.value = result.data[1].msg;
......@@ -921,6 +954,113 @@ export default defineComponent({
}
getuserdata();
var left = ref();
var top = ref();
var currentContextTabId = ref();
//标签右击事件
function openContextMenu(e) {
if (e.srcElement.id) {
currentContextTabId.value = e.srcElement.id.split("-")[1];
contextMenuVisible.value = true;
// this.$store.commit("saveCurContextTabId", currentContextTabId);
left.value = e.clientX-200;
top.value = e.clientY - 70;
}
}
// 关闭所有标签页
function closeAllTabs() {
editableTabs.value = [
{
title: "首页-实时热源",
path: "/RealSupply",
},
];
//本地存储
window.sessionStorage.setItem(
"tabList",
JSON.stringify(editableTabs.value)
);
//路由跳转
router.push('/RealSupply');
contextMenuVisible.value = false;
}
// 关闭其它标签页
function closeOtherTabs() {
editableTabs.value = editableTabs.value.filter(
(item) => item.path === currentContextTabId.value || item.path === '/RealSupply'
);
//本地存储
window.sessionStorage.setItem(
"tabList",
JSON.stringify(editableTabs.value)
);
//路由跳转
router.push(currentContextTabId.value);
contextMenuVisible.value = false;
}
// 关闭contextMenu
function closeContextMenu() {
contextMenuVisible.value = false;
}
// 关闭左侧标签页
function closeLeftTabs() {
let isTabs = currentContextTabId.value;
const tabs = editableTabs.value;
tabs.forEach((item, index) => {
if (item.path == currentContextTabId.value) {
//找到了需要删除的菜单
//获取上一个或下一个标签
const nextTab = tabs[index - 1];
if(nextTab && nextTab.path == activeTable.value){
activeTable.value = '/RealSupply';
}
if (nextTab) {
isTabs = nextTab.path;
}
}
});
editableTabs.value = editableTabs.value.filter(
(item) => item.path != isTabs || item.path === '/RealSupply'
);
//本地存储
window.sessionStorage.setItem(
"tabList",
JSON.stringify(editableTabs.value)
);
//路由跳转
router.push(activeTable.value);
contextMenuVisible.value = false;
}
// 关闭右侧标签页
function closeRigthTabs() {
let isTabs = activeTable.value;
const tabs = editableTabs.value;
tabs.forEach((item, index) => {
if (item.path == currentContextTabId.value) {
//找到了需要删除的菜单
//获取上一个或下一个标签
const nextTab = tabs[index + 1];
if(nextTab && nextTab.path == activeTable.value){
activeTable.value = '/RealSupply';
}
if (nextTab) {
isTabs = nextTab.path;
editableTabs.value = editableTabs.value.filter(
(item) => item.path != isTabs || item.path === '/RealSupply'
);
}
}
});
//本地存储
window.sessionStorage.setItem(
"tabList",
JSON.stringify(editableTabs.value)
);
//路由跳转
router.push(activeTable.value);
contextMenuVisible.value = false;
}
return {
menuWidth,
mainHeight,
......@@ -958,6 +1098,14 @@ export default defineComponent({
showenterpriseName,
savepass,
funsel,
openContextMenu,
left,
top,
closeAllTabs,
closeOtherTabs,
closeContextMenu,
closeRigthTabs,
closeLeftTabs
};
},
methods: {
......
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