Commit e7e20471 authored by moonby's avatar moonby

Merge branch 'master' of gitee.com:tj-wang-yahui/AMS_HeatSys_Vue_V10

parents d9057921 70111bf1
......@@ -71,13 +71,6 @@ export const postSecAbsTUc = params => {
})
}
// //二网温差
// export const postSecAvgTUc = params => {
// return http.post(`/api/analysis/external/SecAvgTUc`, 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) {
......@@ -85,3 +78,23 @@ export const postHeatAnalysis = params => {
})
}
//换热站机组用量环比接口(耗水量、耗电量、耗热量)网内
export const postWithinQOQ = params => {
return http.post(`/api/analysis/within/QOQ`, params).then(res => res).catch(function (error) {
console.log(error);
})
}
//换热站机组用量环比接口(耗水量、耗电量、耗热量)网外
export const postExternalQOQ = params => {
return http.post(`/api/analysis/external/QOQ`, params).then(res => res).catch(function (error) {
console.log(error);
})
}
//换热站机组用量同比接口(耗水量、耗电量、耗热量)
export const postYOY = params => {
return http.post(`/api/analysis/external/YOY`, params).then(res => res).catch(function (error) {
console.log(error);
})
}
\ No newline at end of file
<template>
状态
<el-table>
<el-card class="remoteTitle">
<div class="card-content">
<div class="demo-button">
<el-button type="primary" size="small" @click="ReadStatus">读取全部</el-button>
<el-button type="primary" size="small" @click="WriteStatus" disabled="false">写入全部</el-button>
</div>
<div class="demo-image">
<div class="block">
<span class="demonstration">读写成功</span>
<el-icon><CircleCheckFilled color="rgb(0,255,0)"/></el-icon>
</div>
<div class="block">
<span class="demonstration">通讯异常</span>
<el-icon><Connection /></el-icon>
</div>
<div class="block">
<span class="demonstration">读写失败</span>
<el-icon><Failed color="rgb(255,0,0)"/></el-icon>
</div>
</div>
</div>
</el-card>
<el-table
ref="tableRef"
v-model:checked="selectedRows"
show-header="true"
:height="tableHeight"
:cell-style="setCellStyle"
border
highlight-current-row
:header-cell-style="setHeaderCellStyle"
:data="visibleData"
v-loading="isLoading"
element-loading-text="数据加载中......"
row-class-name="fixed-row-height"
element-loading-background="rgba(0, 0, 0, 0.8)"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="rowIndex" label="序号" width="45px" fixed />
<el-table-column prop="transferId" label="机组编号" v-if="false" width="80px" fixed />
<el-table-column prop="transferName" label="换热机组" width="150px" fixed />
<el-table-column prop="jDValue" label="华为控制模式" width="80px" />
<el-table-column prop="gainMode" label="增益模式" width="80px" />
<el-table-column prop="weatherMode" label="气象仪模式" width="80px" />
<el-table-column prop="curveMode" label="曲线对应模式" width="80px" />
<el-table-column prop="criclePump1" label="1#循环泵启停" width="80px" />
<el-table-column prop="criclePump2" label="2#循环泵启停" width="80px" />
<el-table-column prop="Pump3" label="3#循环泵启停" width="80px" />
<el-table-column prop="Pump4" label="4#循环泵启停" width="80px" />
<el-table-column prop="ReplenishingPump" label="补水泵启停" width="80px" />
<el-table-column prop="SecPump1" label="1#二级泵启停" width="80px" />
<el-table-column prop="Evc1AutoOrManual" label="1#电动调节阀手动/自动切换" width="100px" />
<el-table-column prop="Evc2AutoOrManual" label="2#电动调节阀手动/自动切换" width="100px" />
<el-table-column prop="Evc3AutoOrManual" label="3#电动调节阀手动/自动切换" width="100px" />
<el-table-column prop="Evc4AutoOrManual" label="4#电动调节阀手动/自动切换" width="100px" />
<el-table-column prop="CriclePump1AutoOrManual" label="一号循环泵 手动/自动切换" width="100px" />
<el-table-column prop="CriclePump2AutoOrManual" label="二号循环泵 手动/自动切换" width="100px" />
<el-table-column prop="CriclePump3AutoOrManual" label="三号循环泵 手动/自动切换" width="100px" />
<el-table-column prop="CriclePump4AutoOrManual" label="四号循环泵 手动/自动切换" width="100px" />
<el-table-column prop="SecCriclePumpAutoOrManual" label="二级泵 手动/自动切换" width="100px" />
<el-table-column fixed="right" label="操作" width="100">
<template #default>
<el-button link type="primary" size="small" @click="ReadStatus">读取</el-button>
<el-button link type="primary" size="small" @click="WriteStatus">写入</el-button>
</template>
</el-table-column>
</el-table>
<el-card style="height: 50px; padding: 0;">
<el-progress
:text-inside="true"
:stroke-width="16"
status="success"
:percentage="progress"
/>
</el-card>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted, watch } from 'vue';
import http from '../../api/http';
import store from "../../store/index";
import { ref, reactive, onMounted, onUnmounted, watch,toRefs } from 'vue';
import http from '../../api/http';
import store from "../../store/index";
const props = defineProps(['activeRadio']);
console.log("1actionValue:"+props.activeRadio);
const enterpriseId = store.getters.getEnterpriseId();
const props = defineProps(['activeRadio']);
const tableRef = ref(null);
const selectedRows = ref([]);
const isLoading= ref(true);
const visibleData = ref([]);
const tableHeight = ref(500);
const progress =ref(0);
const state = reactive({
fits: ['Success', 'fale', 'cover', 'none', 'scale-down'],
url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
})
const { fits, url } = toRefs(state);
//监听修改actionValue状态
watch(() =>props.activeRadio, (oldValue, newValue) => {
......@@ -18,8 +100,100 @@
initData();
},{deep:true});
function initData(){
function setContentHeight() {
tableHeight.value = window.innerHeight - 300;
}
async function initData(){
isLoading.value = true;
var type = 0;
if(enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
type = 1;
}
var result = await http.post('/api/remote/GetTransferStatus',{"SupplyType":type, "DeviceId": props.activeRadio});
console.log(result);
visibleData.value = result.data;
isLoading.value = false;
}
initData();
</script>
\ No newline at end of file
async function ReadStatus(){
if(selectedRows){
selectedRows.value.forEach(item =>{
ReadStation(item);
})
}
}
async function WriteStatus(){
}
async function ReadStation(value){
var result = await http.post('', value);
var jobj = result.data;
console.log(jobj);
}
onMounted(() => {
setContentHeight();
window.addEventListener('resize', setContentHeight);
})
onUnmounted(() => {
window.removeEventListener('resize', setContentHeight);
})
function setCellStyle({ row, column, rowIndex, columnIndex }) {
let css_color = {};
css_color['padding-left'] = '0px';
css_color['padding-right'] = '0px';
css_color['borderColor'] = '#97d5fd';
css_color['padding'] = '0px';
return css_color;
}
function setHeaderCellStyle({ row, column, rowIndex, columnIndex }) {
let css_color;
var backcolor = 'd9f1ff';
css_color = { 'background-color': '#' + backcolor, 'padding-left': '0px', 'padding-right': '0px', 'borderColor': '#97d5fd', 'color': '#000', 'text-align': 'center', 'vertical-align': 'top' };
var backcolor = 'd9f1ff';
css_color = { 'background-color': '#' + backcolor, 'padding-left': '0px', 'padding-right': '0px', 'borderColor': '#97d5fd', 'color': '#000', 'text-align': 'center', 'vertical-align': 'top' };
return css_color;
}
</script>
<style scoped>
.remoteTitle{
width: 100%;
}
.card-content {
display: flex;
justify-content: space-between;
}
.demo-image {
width: 70%;
display: right;
flex: 9;
}
.demo-image .block {
padding: 1px 0;
text-align: center;
border-right: solid 1px var(--el-border-color);
display: inline-block;
width: 80px;
box-sizing: border-box;
vertical-align: top;
}
.demo-image .block:last-child {
border-right: none;
}
.demo-image .demonstration {
display: block;
color: var(--el-text-color-secondary);
font-size: 12px;
margin-bottom: 0px;
}
</style>
\ No newline at end of file
......@@ -1009,673 +1009,6 @@ export default defineComponent({
}
this.gYSupplyWaterTime = [];
this.gYSupplyWater = res.data.hourWater;
// this.gYSupplyWater = {
// success: true,
// status: 0,
// message: "操作成功",
// data: [
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-01 22:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 22,
// temperature: -1.6,
// waterRecord: 1.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-01 23:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 23,
// temperature: -2.1,
// waterRecord: 2.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 00:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 0,
// temperature: -2.2,
// waterRecord: 1.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 01:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 1,
// temperature: -2.5,
// waterRecord: 1.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 02:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 2,
// temperature: -2.7,
// waterRecord: 0.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 03:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 3,
// temperature: -2.9,
// waterRecord: 0.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 04:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 4,
// temperature: -3.1,
// waterRecord: 0.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 05:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 5,
// temperature: -3.6,
// waterRecord: 0.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 06:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 6,
// temperature: -3.6,
// waterRecord: 0.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 07:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 7,
// temperature: -4.2,
// waterRecord: 0.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 08:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 8,
// temperature: -3.5,
// waterRecord: 0.0,
// },
// {
// supplyId: "a523dc33-c8b8-41c2-9751-a32083627344",
// supplyName: "重阳里供热站",
// gatherTime: "2024-01-02 09:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 9,
// temperature: -1.8,
// waterRecord: 0.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-01 22:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 22,
// temperature: -1.6,
// waterRecord: 0.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-01 23:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 23,
// temperature: -2.1,
// waterRecord: 2.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 00:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 0,
// temperature: -2.2,
// waterRecord: 0.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 01:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 1,
// temperature: -2.5,
// waterRecord: 0.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 02:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 2,
// temperature: -2.7,
// waterRecord: 1.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 03:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 3,
// temperature: -2.9,
// waterRecord: 0.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 04:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 4,
// temperature: -3.1,
// waterRecord: 1.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 05:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 5,
// temperature: -3.6,
// waterRecord: 4.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 06:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 6,
// temperature: -3.6,
// waterRecord: 0.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 07:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 7,
// temperature: -4.2,
// waterRecord: 0.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 08:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 8,
// temperature: -3.5,
// waterRecord: 0.0,
// },
// {
// supplyId: "ccfb0595-86f7-4c0a-a134-8e945180ee48",
// supplyName: "行政区供热站",
// gatherTime: "2024-01-02 09:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 9,
// temperature: -1.8,
// waterRecord: 0.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-01 22:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 22,
// temperature: -1.6,
// waterRecord: 1.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-01 23:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 23,
// temperature: -2.1,
// waterRecord: 1.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 00:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 0,
// temperature: -2.2,
// waterRecord: 2.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 01:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 1,
// temperature: -2.5,
// waterRecord: 2.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 02:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 2,
// temperature: -2.7,
// waterRecord: 1.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 03:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 3,
// temperature: -2.9,
// waterRecord: 3.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 04:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 4,
// temperature: -3.1,
// waterRecord: 3.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 05:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 5,
// temperature: -3.6,
// waterRecord: 1.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 06:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 6,
// temperature: -3.6,
// waterRecord: 2.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 07:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 7,
// temperature: -4.2,
// waterRecord: 1.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 08:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 8,
// temperature: -3.5,
// waterRecord: 1.0,
// },
// {
// supplyId: "33104782-c1ad-432c-953e-e31c2e031be4",
// supplyName: "福苑里供热站",
// gatherTime: "2024-01-02 09:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 9,
// temperature: -1.8,
// waterRecord: 0.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-01 22:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 22,
// temperature: -1.6,
// waterRecord: 3.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-01 23:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 23,
// temperature: -2.1,
// waterRecord: 4.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 00:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 0,
// temperature: -2.2,
// waterRecord: 1.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 01:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 1,
// temperature: -2.5,
// waterRecord: 2.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 02:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 2,
// temperature: -2.7,
// waterRecord: 1.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 03:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 3,
// temperature: -2.9,
// waterRecord: 2.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 04:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 4,
// temperature: -3.1,
// waterRecord: 5.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 05:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 5,
// temperature: -3.6,
// waterRecord: 5.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 06:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 6,
// temperature: -3.6,
// waterRecord: 2.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 07:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 7,
// temperature: -4.2,
// waterRecord: 3.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 08:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 8,
// temperature: -3.5,
// waterRecord: 4.0,
// },
// {
// supplyId: "dfa20074-8731-457f-b63f-4e1858cfe266",
// supplyName: "东部供热站",
// gatherTime: "2024-01-02 09:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 9,
// temperature: -1.8,
// waterRecord: 2.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-01 22:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 22,
// temperature: -1.6,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-01 23:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 1,
// gatherHour: 23,
// temperature: -2.1,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 00:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 0,
// temperature: -2.2,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 01:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 1,
// temperature: -2.5,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 02:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 2,
// temperature: -2.7,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 03:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 3,
// temperature: -2.9,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 04:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 4,
// temperature: -3.1,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 05:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 5,
// temperature: -3.6,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 06:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 6,
// temperature: -3.6,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 07:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 7,
// temperature: -4.2,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 08:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 8,
// temperature: -3.5,
// waterRecord: 0.0,
// },
// {
// supplyId: "b354f45b-23e5-42be-a210-0fb92394f457",
// supplyName: "小王庄供热站",
// gatherTime: "2024-01-02 09:00:00",
// gatherYear: 2024,
// gatherMonth: 1,
// gatherDay: 2,
// gatherHour: 9,
// temperature: -1.8,
// waterRecord: 0.0,
// },
// ],
//};
var huor = this.gYSupplyWater[0].gatherHour;
for (var i = 0; i < 12; i++) {
if (huor < 24) {
......
......@@ -364,6 +364,13 @@ const routes = [
meta: {
title: '视频监控'
}
},{
path: '/Scheduling/WeatherManage',
name: 'WeatherManage',
component: () => import('@/views/Scheduling/WeatherManage.vue'),
meta: {
title: '气象干预'
}
}
]
},
......
......@@ -108,7 +108,7 @@ function sortMethod({ order, prop }){
direction = 'DESC'
}
if(i === "name"){
sortname = "name";
sortname = "UnitName";
}else if(i === "alarmDate"){
sortname = "alarmDate";
}
......@@ -305,6 +305,7 @@ function gettransfer() {
}
http.post("/api/alarm/" + type.value, AlarmInfo).then((result) => {
console.log(result.data);
console.log(AlarmInfo);
if(result.data !== null){
tableData.value = result.data.dataInfoList;
total.value = result.data.rowCount;
......
<script setup>
import { defineComponent } from "vue";
import * as echarts from "echarts";
</script>
<template>
<div class="content">
<el-row :gutter="15" style="width: 94%; margin: 1%">
<el-col :span="4"
><div class="block">
<span class="demonstration">换热机组:</span>
<div
class="contentBlock"
id="contentBlock"
element-loading-background="rgba(122, 122, 122, 0.6)"
>
<el-card class="card-contianer">
<el-form
:inline="true"
:model="enertyInfo"
ref="formRef"
label-position="top"
>
<el-form-item>
<el-switch
v-model="switchV"
active-text="曲线图"
inactive-text="表格"
style="
--el-switch-on-color: #13ce66;
--el-switch-off-color: #6589ff;
min-width: 130px;
margin: 12% 0 0 0;
"
@change="changeFun"
/>
</el-form-item>
<el-form-item label="设备类型">
<el-select
v-model="networkType"
placeholder="请选择"
@change="selTypeChange"
style="width: 100px"
>
<el-option label="网内" :value="1" />
<el-option label="网外" :value="2" />
</el-select>
</el-form-item>
<el-form-item
label="网内:"
prop="supplyIdList"
v-show="networkType == 1"
>
<el-cascader
:options="options1.value"
v-model="enertyInfo.supplyIdList"
:props="props"
collapse-tags
:show-all-levels="false"
placeholder="请选择"
@change="transferIdChange"
/>
</el-form-item>
<el-form-item label="网外:" prop="idList" v-show="networkType == 2">
<el-cascader
:options="options"
v-model="enertyInfo.idList"
:props="props"
clearable
style="width: 60%"
></el-cascader></div
></el-col>
<el-col :span="4"
><div class="block">
<span class="demonstration">开始时间:</span>
<el-date-picker
v-model="value1"
type="datetime"
placeholder="选择日期时间"
style="width: 60%"
>
</el-date-picker></div
></el-col>
<el-col :span="4"
><div class="block">
<span class="demonstration">结束时间:</span>
<el-date-picker
v-model="value1"
type="datetime"
placeholder="选择日期时间"
style="width: 60%"
>
</el-date-picker></div
></el-col>
<el-col :span="4"
><div class="block">
<span class="demonstration">时间类型:</span
><el-select
v-model="timeType"
collapse-tags
:show-all-levels="false"
placeholder="请选择"
@change="transferIdChange"
/>
</el-form-item>
<el-form-item label="开始时间:" prop="startTime">
<el-config-provider :locale="zhCn">
<el-date-picker
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择开始时间"
v-model="enertyInfo.startTime"
:clearable="false"
/>
</el-config-provider>
</el-form-item>
<el-form-item label="结束时间:" prop="endTime">
<el-config-provider :locale="zhCn">
<el-date-picker
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择结束时间"
v-model="enertyInfo.endTime"
:clearable="false"
/>
</el-config-provider>
</el-form-item>
<el-form-item label="时间类型">
<el-select
v-model="enertyInfo.interval"
placeholder="请选择"
style="width: 60%"
style="width: 80px"
>
<el-option
v-for="item in timeTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select></div
></el-col>
<el-col :span="4"
><div class="block">
<span class="demonstration">能耗类型:</span
><el-select
v-model="timeType"
<el-option label="小时" :value="0" />
<el-option label="日" :value="1" />
<el-option label="周" :value="2" />
<el-option label="月" :value="3" />
</el-select>
</el-form-item>
<el-form-item label="能耗类型">
<el-select
v-model="enertyInfo.energyType"
placeholder="请选择"
style="width: 60%"
style="width: 80px"
@change="postExternalQOQFun"
>
<el-option label="耗气" :value="1" v-show="networkType == 1" />
<el-option label="耗水" :value="2" />
<el-option label="耗热" :value="3" />
<el-option label="耗电" :value="4" />
</el-select>
</el-form-item>
<div style="position: absolute; right: 2%">
<el-button
type="primary"
@click="postExternalQOQFun"
style="margin: 15px 0 0 0"
>查询</el-button
><el-button
type="primary"
@click="exportTableToExcel"
style="margin: 15px 0 0 10px"
>导出表格</el-button
>
<el-option
v-for="item in timeTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select></div
></el-col>
<el-col :span="4"
><el-button type="primary">查询</el-button>
<el-button type="primary">导出</el-button></el-col
</div>
</el-form>
</el-card>
<div v-show="!switchV">
<el-table
:data="tableData"
v-loading="tabloading"
:height="tableHeight"
style="width: 100%"
empty-text="暂无数据"
>
</el-row>
<el-divider></el-divider>
<div class="echartsLayer1" id="echartsLayer1"></div>
<el-table-column prop="rowId" label="序号" align="center" width="80" />
<el-table-column prop="transferName" label="换热站机组名称" />
<el-table-column prop="gatherTime" label="时间" />
<el-table-column prop="temperature" label="温度(℃)" />
<el-table-column
prop="record"
label="耗气量"
v-if="enertyInfo.energyType == '1'"
/>
<el-table-column
prop="record"
label="耗水量(T)"
v-if="enertyInfo.energyType == '2'"
/>
<el-table-column
prop="record"
label="耗热量(GJ)"
v-if="enertyInfo.energyType == '3'"
/>
<el-table-column
prop="record"
label="耗电量(A)"
v-if="enertyInfo.energyType == '4'"
/>
</el-table>
</div>
<div v-show="switchV" id="echartsLayerBlock">
<div class="echartsLayer" id="echartsLayer"></div>
</div>
</div>
</template>
<script>
//import { getToken } from "../api/screenDisplay";
import { postQOQlist } from "../../api/analysis";
export default defineComponent({
data() {
return {
myChart: null,
QOQlist: [],
QOQlistTime: [],
QOQlistRecord: [],
QOQlistTemperature: [],
props: { multiple: true },
options: [
{
value: 1,
label: "港东供热服务中心",
children: [
{
value: 2,
label: "东部供热站",
children: [
{ value: 3, label: "港东锅炉房" },
{ value: 4, label: "大港一中" },
{ value: 5, label: "福合园" },
],
},
{
value: 7,
label: "小王庄供热站",
children: [
{ value: 3, label: "港东锅炉房" },
{ value: 4, label: "大港一中" },
{ value: 5, label: "福合园" },
],
},
],
},
{
value: 17,
label: "城区供热服务中心",
children: [
{
value: 18,
label: "小王庄供热站",
children: [
{ value: 19, label: "站1" },
{ value: 20, label: "站2" },
],
},
],
},
],
timeTypeList: [
{
value: "1",
label: "小时",
},
{
value: "2",
label: "日",
},
{
value: "3",
label: "周",
},
{
value: "4",
label: "月",
},
],
recordList: [
{
value: "2",
label: "水耗(T)",
},
{
value: "3",
label: "热耗(GJ)",
},
{
value: "4",
label: "电耗(A)",
},
],
};
},
created() {},
mounted: function mounted() {
this.login();
window.onresize = function () {
//location.reload();
};
},
methods: {
login() {
// let params = {
// userName: "yinghuachen",
// password: "yhc_abc123",
// verificationCode: "bKnU",
// uuid: "04da48c6-99f9-4370-a33d-9cfcf67b59b7",
// };
// getToken(params).then((res) => {
// if (res.success === true) {
// sessionStorage.setItem("token", res.data.token);
this.postQOQlist(); // 换热站机组能耗数据接口(用量环比)
// } else {
// console.log(res.message);
// }
// });
<script setup>
import { ref, reactive, onMounted, onUnmounted } from "vue";
import store from "../../store/index";
import * as echarts from "echarts";
import http from "../../api/http";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import { ElMessage } from "element-plus";
import { saveAs } from "file-saver";
import XLSX from "xlsx-js-style";
import { postExternalQOQ, postWithinQOQ } from "../../api/analysis";
const tdType = ref(1);
const networkType = ref(2);
const enertyInfo = reactive({
supplyIdList: [],
idList: [],
startTime: null,
endTime: null,
energyType: 2,
interval: 0,
});
const options = reactive([]);
const options1 = reactive([]);
const enterpriseId = ref();
const props = { multiple: true, emitPath: false };
const switchV = ref(true);
const echartF = ref(false);
const nodata = ref(false);
let tableData = reactive([]);
const echartTitle = reactive(["耗水量趋势图"]);
const echartData = reactive([]);
const echartDataTime = reactive([]);
const echartDataLegend = reactive([]);
const echartSeries = reactive([]);
const tabloading = ref(false);
const tableHeight = ref(500);
const computedWidth = ref("1200px");
const computedHeight = ref("500px");
const formRef = ref(null);
const company = ref("T");
const enertyTab = ref("能耗值");
const fullscreenLoading = ref(false);
const enertyInfoStyle = reactive(0);
const energyType = reactive(1);
const qoqEnergyType = reactive(3);
const energyTypeDis = ref(false);
const rules = {
transferId: [{ required: true, message: "请选择换热机组", trigger: "blur" }],
startTime: [{ required: true, message: "请选择开始时间", trigger: "blur" }],
endTime: [{ required: true, message: "请选择结束时间", trigger: "blur" }],
};
function getEnterprise() {
var result = store.getters.getEnterprise();
if (result) {
enterpriseId.value = result[0].enterpriseId;
}
}
function transferIdChange() {
// if (enertyInfo.transferId.length > 10) {
// ElMessage.error("换热机组最多只能选择10个");
// }
}
function exportTableToExcel() {
const worksheet = XLSX.utils.json_to_sheet(tableData);
const workbook = XLSX.utils.book_new();
XLSX.utils.sheet_add_aoa(
worksheet,
[["换热站机组名称", "时间", "平均温度", enertyTab.value]],
{
origin: "A1",
}
);
worksheet["!cols"] = [{ wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 20 }];
// worksheet["!rows"] = [{ hpx: 20 }];
worksheet["A1"].s = {
fill: {
fgColor: { rgb: "0097d5fd" },
},
};
worksheet["B1"].s = {
fill: {
fgColor: { rgb: "0097d5fd" },
},
};
worksheet["C1"].s = {
fill: {
fgColor: { rgb: "0097d5fd" },
},
};
worksheet["D1"].s = {
fill: {
fgColor: { rgb: "0097d5fd" },
},
};
//换热站机组能耗数据接口(用量环比)
postQOQlist() {
let _this = this;
let params = {
supplyIdList: null,
idList: ["EF0864C6-1A01-41CF-94BE-523B4D6063DB"],
startTime: "2024-01-01 00:00:00",
endTime: "2024-02-01 00:00:00",
energyType: 2,
interval: 1,
};
postQOQlist(params).then((res) => {
if (res.success === true) {
res.data.forEach((element) => {
this.QOQlistTime.push(element.gatherTime.split("T00:00:00")[0]);
this.QOQlistRecord.push(element.record);
this.QOQlistTemperature.push(element.temperature);
XLSX.utils.book_append_sheet(workbook, worksheet, "换热站趋势");
const excelBuffer = XLSX.write(workbook, { bookType: "xlsx", type: "array" });
const dataBlob = new Blob([excelBuffer], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8",
});
const downloadUrl = URL.createObjectURL(dataBlob);
saveAs(dataBlob, "tableData.xlsx");
ElMessage.success("导出成功!请稍后。。。");
}
function timeFun() {
const today = new Date();
const preday = new Date(today);
const prehour = new Date(today.getTime() - 60 * 60 * 1000);
today.setDate(today.getDate());
preday.setDate(preday.getDate() - 1);
var hour = today.getHours();
enertyInfo.startTime =
preday.toISOString().split("T")[0] + " " + hour + ":00:00";
enertyInfo.endTime =
today.toISOString().split("T")[0] + " " + prehour.getHours() + ":00:00";
}
//获取换热机组列表
function getSupplys() {
var result = store.getters.getEnterprise();
if (result) {
result.forEach((element) => {
if (element.enterpriseId === enterpriseId.value) {
if (
element.enterpriseId ===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()
) {
element.serviceCenterList.forEach((center) => {
let c = [];
center.supplyList.forEach((supply) => {
let chi = [];
supply.transferList.forEach((unit) => {
chi.push({ value: unit.unitId, label: unit.unitName });
});
c.push({
children: chi,
value: supply.supplyId,
label: supply.supplyName,
});
});
options.push({ children: c, label: center.serviceCenterName });
});
this.echartInit1();
} else {
element.supplyList.forEach((element) => {
let chi = [];
element.transferList.forEach((unit) => {
chi.push({ value: unit.unitId, label: unit.unitName });
});
options.push({
children: chi,
value: supply.supplyId,
label: element.supplyName,
});
});
}
});
},
echartInit1: function () {
var chartDom = document.getElementById("echartsLayer1");
var myChart = echarts.init(chartDom);
var option;
window.onresize = () => {
myChart.resize();
};
}
});
}
options1.value = JSON.parse(JSON.stringify(options));
options1.value.forEach((element) => {
element.children.forEach((element1) => {
delete element1.children;
});
});
enertyInfo.supplyIdList.push(options1.value[0].children[0].value);
enertyInfo.idList.push(options[0].children[0].children[0].value);
}
function selTypeChange() {
if (enertyInfo.type == 0) {
energyTypeDis.value = true;
} else {
energyTypeDis.value = false;
}
}
//换热站机组能耗数据接口(用量环比)
function postExternalQOQFun() {
tabloading.value = true;
switch (enertyInfo.energyType) {
case 1:
company.value = "Nm³";
echartTitle.value = "耗气量趋势图";
break;
case 2:
company.value = "T";
echartTitle.value = "耗水量趋势图";
break;
case 3:
company.value = "GJ";
echartTitle.value = "耗热量趋势图";
break;
case 4:
company.value = "A";
echartTitle.value = "耗电量趋势图";
break;
}
let params = {
supplyIdList: networkType.value == 1 ? enertyInfo.supplyIdList : null,
idList: networkType.value == 2 ? enertyInfo.idList : null,
startTime: enertyInfo.startTime,
endTime: enertyInfo.endTime,
energyType: enertyInfo.energyType,
interval: enertyInfo.interval,
};
clearData();
if (networkType.value == 2) {
postExternalQOQ(params).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
if (res.data.hourWater.length >0) {
pageInitFun(res);
tableData = res.data.hourWater;
}
} else {
ElMessage.error(res.message);
}
});
} else {
postWithinQOQ(params).then((res) => {
echarts.dispose(document.getElementById("echartsLayer"));
if (res.success === true) {
if (res.data.data.length >0) {
pageInitFun(res);
tableData = res.data.hourWater;
}
} else {
ElMessage.error(res.message);
}
});
}
}
function clearData() {
echartData.length = 0;
echartSeries.length = 0;
echartDataLegend.length = 0;
echartDataTime.length = 0;
tableData.length = 0;
tabloading.value = false;
}
var company = "T";
function pageInitFun(res) {
tableData.length = 0;
res.data.hourWater.forEach((element) => {
let tableArr = {
transferName: element.transferName,
gatherTime: element.gatherTime,
temperature: element.temperature,
uc: parseFloat(element.uc).toFixed(2),
};
tableData.push(tableArr);
});
nodata.value = true;
tabloading.value = false;
echartData.length = 0;
echartSeries.length = 0;
echartDataLegend.length = 0;
echartDataTime.length = 0;
echartData.value = dataDeal(res.data.hourWater);
echartData.value[0].listInfo.forEach((element) => {
if (element.gatherTime) {
echartDataTime.push(element.gatherTime);
}
});
echartData.value.forEach((element) => {
let data1 = [];
let data2 = [];
element.listInfo.forEach((item) => {
data1.push(item.temperature);
data2.push(parseFloat(item.record).toFixed(2));
});
option = {
echartSeries.push(
// {
// name: element.transferName + "温度",
// type: "line",
// tooltip: {
// valueFormatter: function (value) {
// return value + " ℃";
// },
// },
// data: data1,
// },
{
name: element.transferName + "能耗",
type: "bar",
yAxisIndex: 1,
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
crossStyle: {
color: "#999",
},
valueFormatter: function (value) {
return value;
},
},
legend: {
data: ["温度", "能耗"],
data: data2,
}
);
});
let temperatureListArr = [];
res.data.temperatureList.forEach((element) => {
temperatureListArr.push(element);
});
echartSeries.push({
name: "平均温度",
type: "line",
tooltip: {
valueFormatter: function (value) {
return value + " ℃";
},
},
data: temperatureListArr,
});
echartSeries.forEach((element, index) => {
echartDataLegend.push(element.name);
});
echartInit();
}
function setContentHeight() {
tableHeight.value = window.innerHeight - 232;
}
function dataDeal(data) {
var listArr = [];
data.forEach(function (el, index) {
for (var i = 0; i < listArr.length; i++) {
if (listArr[i].transferId == el.transferId) {
listArr[i].listInfo.push({
gatherDay: el.gatherDay,
gatherHour: el.gatherHour,
gatherMonth: el.gatherMonth,
gatherTime: el.gatherTime.replace("T", " "),
gatherYear: el.gatherYear,
temperature: el.temperature,
transferId: el.transferId,
transferName: el.transferName,
record: el.record,
});
return;
}
}
listArr.push({
transferId: el.transferId,
transferName: el.transferName,
listInfo: [
{
gatherDay: el.gatherDay,
gatherHour: el.gatherHour,
gatherMonth: el.gatherMonth,
gatherTime: el.gatherTime.replace("T", " "),
gatherYear: el.gatherYear,
temperature: el.temperature,
transferId: el.transferId,
record: el.record,
},
xAxis: [
{
type: "category",
data: this.QOQlistTime,
axisPointer: {
type: "shadow",
},
axisLabel: {
rotate: 45, // X轴标签倾斜 45 度
},
},
],
yAxis: [
{
type: "value",
name: "温度",
axisLabel: {
formatter: "{value} ℃",
},
},
{
type: "value",
name: "能耗",
position: "right",
min: 0,
max: 100,
axisLabel: {
formatter: "{value} " + company,
},
},
],
series: [
{
name: "温度",
type: "line",
tooltip: {
valueFormatter: function (value) {
return value + " ℃";
},
},
data: this.QOQlistTemperature,
},
{
name: "能耗",
type: "bar",
tooltip: {
valueFormatter: function (value) {
return value + company;
},
},
data: this.QOQlistRecord,
},
],
};
],
});
});
return listArr;
}
function echartInit() {
var chartDom = document.getElementById("echartsLayer");
var myChart = echarts.init(chartDom);
var option;
myChart.resize({ width: computedWidth.value, height: computedHeight.value });
option && myChart.setOption(option);
// var company = "T";
option = {
color: [
"#91cc75",
"#fac858",
"#5470c6",
"#ee6666",
"#73c0de",
"#3ba272",
"#fc8452",
"#ea7ccc",
"#766451",
"#cba1ff",
"#470c66",
],
title: {
text: echartTitle.value,
top: 0,
left: 50,
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
crossStyle: {
color: "#999",
},
},
},
},
legend: {
width: "70%",
data: echartDataLegend,
},
xAxis: [
{
type: "category",
data: echartDataTime,
axisPointer: {
type: "shadow",
},
axisLabel: {
rotate: 45, // X轴标签倾斜 45 度
},
},
],
grid: {
left: 100,
right: 100,
top: 70,
bottom: 100,
},
yAxis: [
{
type: "value",
name: "温度",
axisLabel: {
formatter: "{value} ℃",
},
},
{
type: "value",
name: "能耗",
position: "right",
axisLabel: {
formatter: "{value} " + company.value,
},
},
],
series: echartSeries,
};
option && myChart.setOption(option);
}
function changeFun() {
tabloading.value = false;
nodata.value = true;
var divWidth = document.getElementById("contentBlock").offsetWidth;
var divHeight = document.getElementById("contentBlock").scrollHeight;
computedWidth.value = divWidth + "px";
computedHeight.value = divHeight * 0.75 + "px";
echartInit();
}
onMounted(() => {
timeFun();
getEnterprise();
getSupplys();
postExternalQOQFun();
changeFun();
window.addEventListener("resize", function () {
location.reload();
});
});
onUnmounted(() => {
window.removeEventListener("resize");
});
</script>
<style scoped>
.content {
margin: 2%;
padding: 0;
width: 96%;
height: 100vh;
<style lang="less" scoped>
.contentBlock {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ffffff;
}
.echartsLayer1 {
.el-form--inline .el-form-item {
margin-right: 10px;
}
.el-form-item {
margin: 5px !important;
}
.echartsLayer {
width: 100%;
height: 60vh;
margin: 2% auto 0;
}
.el-form-item__content {
align-items: right !important;
}
</style>
\ No newline at end of file
<template>
换热站巡更
</template>
<!-- 条件筛选卡片 -->
<el-card class="card-contianer">
<div class="div-header">
<el-form-item label="设备:">
<el-cascader :options="options" v-model="PatrolInfo.Id" :props="props" collapse-tags clearable :show-all-levels="false"
placeholder="请选择" style="min-width: 210px;" />
</el-form-item>
<el-form-item label="开始时间:">
<el-config-provider :locale="zhCn">
<el-date-picker v-model="PatrolInfo.startTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择开始时间" style="min-width: 180px;" /> <!-- 日期时间格式 2024-01-01 00:00:00-->
</el-config-provider>
</el-form-item>
<el-form-item label="结束时间:">
<el-config-provider :locale="zhCn">
<el-date-picker v-model="PatrolInfo.endTime" type="datetime" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="选择结束时间" style="min-width: 180px;" />
</el-config-provider>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getdata" style="min-width: 70px;">查询</el-button>
</el-form-item>
</div>
</el-card>
<el-card class="moduleCard" :height="tableHeight">
<el-table :data="tableData" :height="tableHeight" v-loading="loading" :cell-style="setCellStyle" id="out-table"
border highlight-current-row :header-cell-style="setHeaderCellStyle" @sort-change="sortMethod" :header-cell-class-name="handleHeadAddClass" >
<el-table-column prop="index" label="编号" :sortable="false" width="80px" fixed />
<el-table-column prop="transferName" label="换热站" :sortable="true" width="200px" fixed />
<el-table-column prop="realName" label="巡更人" :sortable="false" width="200px" fixed />
<el-table-column prop="patrolTime" label="巡更时间" :sortable="true" width="200px" fixed />
</el-table>
</el-card>
<el-footer style="height: 8px;">
<el-config-provider :locale="zhCn">
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize"
:page-sizes="[30, 40, 50, 100, 200, 300]" :small="true" :disabled="disabled" :background="background"
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="getdata" @current-change="getdata"
class="pagination" />
</el-config-provider>
</el-footer>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue';
import http from '../../api/http';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import store from "../../store/index";
import { getFileName } from '../../utils/utils';
//分页设置
const currentPage = ref(1)
var pageSize = ref(30)
const disabled = ref(false)
const background = ref(false)
const total = ref()
const options = reactive([]);
const exporter = ref("TransExport")
const tableData = ref([]);
const tableHeight = ref(500);
const enterpriseId = ref();
const loading = ref(true);
const sortField = reactive({});
const type = ref('GetTransAlarmData');
getEnterprise();
function getEnterprise(){
var result = store.getters.getEnterprise();
if (result) {
enterpriseId.value = result[0].enterpriseId;
}
}
const props = { multiple: true, emitPath: false }
function setContentHeight() {
tableHeight.value = window.innerHeight - 232;
}
//获取排序的方法
function sortMethod({ order, prop }){
// 触发的排序和缓存的排序相同时,取消该字段的排序
if (!order || sortField[prop] === order) {
sortField[prop] = null
} else {
sortField[prop] = order
}
// console.log(sortField)
let sortname = "";
let sortnames = "";
let direction = '';
for (const i in sortField) {
if (sortField[i] == 'ascending') {
direction = 'ASC'
} else if (sortField[i] == 'descending') {
direction = 'DESC'
}
if(i === "transferName"){
sortname = "UnitName";
}else if(i === "patrolTime"){
sortname = "PatrolTime";
}
// console.log(sortname)
if(sortnames===""){
sortnames = sortnames + sortname + " " + direction;
}else{
sortnames = sortnames + "," + sortname + " " + direction;
}
PatrolInfo.sort = sortnames;
}
getdata() //调用后端查询接口
}
function handleHeadAddClass({ column }) {
if (sortField[column.property]) {
column.order = sortField[column.property]
}
}
var date = new Date();
var year = date.getFullYear();
var day = 0;
var dateArr = [
date.getMonth() + 1, //月份从0~11,所以加一
date.getDate(),
date.getHours(),
date.getMinutes(),
date.getSeconds(),
];
for (var i = 0; i < dateArr.length; i++) {
if (dateArr[i] >= 1 && dateArr[i] <= 9) {
dateArr[i] = "0" + dateArr[i];
}
}
day = dateArr[1] - 1;
if (day >= 1 && day <= 9) {
day = "0" + day;
}
var startTime = sessionStorage.getItem("DeviceQueryStart");
console.log(!!startTime);
if(!!startTime){
startTime = year + "-" + dateArr[0] + '-' + day + " " + dateArr[2] + ":" + dateArr[3] + ":" + dateArr[4];
sessionStorage.setItem("DeviceQueryStart", startTime);
}
var endTime = sessionStorage.getItem("DeviceQueryEnd");
if(!!endTime){
endTime = year + "-" + dateArr[0] + "-" + dateArr[1] + " " + dateArr[2] + ":" + dateArr[3] + ":" + dateArr[4];
sessionStorage.setItem("DeviceQueryEnd", endTime);
}
const PatrolInfo = reactive({
"Id": [],
"startTime": startTime,
"endTime": endTime,
"start": 0,
"count": 30,
"sort": ""
})
getSupplys();
getdata();
function getdata() {
sessionStorage.setItem("DeviceQueryStart", PatrolInfo.startTime);
sessionStorage.setItem("DeviceQueryEnd", PatrolInfo.endTime);
gettransfer();
}
//获取换热机组列表
function getSupplys(){
loading.value = true;
tableData.value.length = 0;
options.length = 0;
PatrolInfo.Id.length = 0;
var result = store.getters.getEnterprise();
if (result) {
result.forEach(element=>{
if(element.enterpriseId=== enterpriseId.value){
if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
element.serviceCenterList.forEach(center=>{
let c = [];
center.supplyList.forEach(supply => {
let chi = [];
supply.transferList.forEach(unit => {
chi.push({ value: unit.unitId, label: unit.unitName });
});
c.push({ children: chi, label: supply.supplyName});
});
options.push({children: c, label: center.serviceCenterName});
})
}else{
element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => {
chi.push({ value: unit.unitId, label: unit.unitName });
})
options.push({ children: chi, label: element.supplyName});
})
}
}
});
}
PatrolInfo.Id.push(options[0].children[0].children[0].value);
}
//获取数据列表
function gettransfer() {
loading.value = true;
if (currentPage.value == 1) {
PatrolInfo.start = 0;
PatrolInfo.count = pageSize.value;
} else {
PatrolInfo.start = ((currentPage.value - 1) * pageSize.value) + 1;
PatrolInfo.count = pageSize.value - 1;
}
http.post("/api/patrol/GetPatrolHisData", PatrolInfo).then((result) => {
console.log(result.data);
console.log(PatrolInfo);
if(result.data !== null){
tableData.value = result.data.dataInfoList;
total.value = result.data.rowCount;
}
if(result.data === null || PatrolInfo.Id.length < 1){
tableData.value = null;
total.value = 0;
}
loading.value = false;
});
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
let css_color = {};
css_color['padding-left'] = '0px';
css_color['padding-right'] = '0px';
css_color['borderColor'] = '#97d5fd';
css_color['padding'] = '0px';
return css_color;
}
function setHeaderCellStyle({ row, column, rowIndex, columnIndex }) {
let css_color;
var backcolor = 'd9f1ff';
css_color = { 'background-color': '#' + backcolor, 'padding-left': '0px', 'padding-right': '0px', 'borderColor': '#97d5fd', 'color': '#000', 'text-align': 'center', 'vertical-align': 'top' };
var backcolor = 'd9f1ff';
css_color = { 'background-color': '#' + backcolor, 'padding-left': '0px', 'padding-right': '0px', 'borderColor': '#97d5fd', 'color': '#000', 'text-align': 'center', 'vertical-align': 'top' };
return css_color;
}
onMounted(() => {
setContentHeight();
window.addEventListener('resize', setContentHeight);
})
onUnmounted(() => {
window.removeEventListener('resize', setContentHeight);
})
</script>
<style lang="less" scoped>
.moduleCard {
width: auto;
overflow: auto;
//max-height: 540px;
padding: 0px;
::v-deep .el-card__body {
padding: 0px;
}
}
.pagination {
padding: 4px;
margin-left: 20px;
height: 30px;
//background-color: #8939cf;
vertical-align: middle;
}
//鼠标所在行的颜色
::v-deep .el-table__body tr:hover>td {
background: linear-gradient(to top, rgb(0, 198, 255), rgb(255, 255, 255)) !important;
}
::v-deep .el-table__body tr.current-row>td {
background-color: #92cbf1 !important;
}
.card-contianer {
width: auto;
height: 70px;
.div-header {
width: 100%;
display: flex;
margin: 20px;
}
}
.el-form-item {
margin-top: -20px;
margin-right: 30px;
}
.el-tag--mini {
height: 21px !important
}
.el-cascader .el-input .el-input__inner:focus, .el-cascader .el-input.is-focus .el-input__inner{
height: 33px; //这里高度根据需求自己设定
}
.el-cascader__tags {
display: inline-flex;
margin-right: 10px;
flex-wrap: nowrap;
}
</style>
\ No newline at end of file
<template>
换热站巡更
</template>
\ No newline at end of file
<!-- 条件筛选卡片 -->
<el-card class="card-contianer">
<div class="div-header">
<el-form-item label="设备:">
<el-cascader :options="options" v-model="AlarmInfo" :props="props" collapse-tags clearable :show-all-levels="false"
placeholder="请选择" style="min-width: 210px;" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getdata" style="min-width: 70px;">查询</el-button>
</el-form-item>
</div>
</el-card>
<el-card class="moduleCard" :height="tableHeight">
<el-table :data="tableData" :row-class-name="rowClassName" :height="tableHeight" v-loading="loading" :cell-style="setCellStyle" id="out-table"
border highlight-current-row :header-cell-style="setHeaderCellStyle" :header-cell-class-name="handleHeadAddClass" >
<el-table-column prop="index" label="编号" :sortable="false" width="70px" fixed />
<el-table-column prop="transferName" label="换热站" :sortable="false" width="170px" fixed />
<el-table-column prop="realName" label="巡更人" :sortable="false" width="150px" fixed />
<el-table-column prop="times" label="日巡次数" :sortable="false" width="120px" fixed />
<el-table-column prop="patrolStatus" label="巡更记录" :sortable="false" width="400px" fixed >
<template #default="scope">
<p v-html="getImgUrl(scope.row.patrolStatus)"></p>
<!-- <span>{{ getImgUrl(scope.row.patrolStatus) }}</span> -->
<!-- <div class="div-form-img">
<el-image class="img-center" v-if="getImgUrl(scope,scope.column.property)" style="width: 20px; height: 20px"
:src="getImgUrl(scope,scope.column.property)" :fit="'cover'" />
</div> -->
</template>
</el-table-column>
</el-table>
</el-card>
</template>
<script lang="ts" setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue';
import http from '../../api/http';
import store from "../../store/index";
const options = reactive([]);
const tableData = ref([]);
const tableHeight = ref(500);
const enterpriseId = ref();
const loading = ref(true);
const sortField = reactive({});
getEnterprise();
function getEnterprise(){
var result = store.getters.getEnterprise();
if (result) {
enterpriseId.value = result[0].enterpriseId;
}
}
const props = { multiple: true, emitPath: false }
function setContentHeight() {
tableHeight.value = window.innerHeight - 195;
}
function handleHeadAddClass({ column }) {
if (sortField[column.property]) {
column.order = sortField[column.property]
}
}
const AlarmInfo = ref([])
getSupplys();
getdata();
function getdata() {
gettransfer();
}
//获取换热机组列表
function getSupplys(){
loading.value = true;
tableData.length = 0;
options.length = 0;
AlarmInfo.length = 0;
var result = store.getters.getEnterprise();
if (result) {
console.log(result)
result.forEach(element=>{
if(element.enterpriseId=== enterpriseId.value){
if(element.enterpriseId === "9BCA54BC-8F27-4849-8D7D-50C5099E1949".toLowerCase()){
element.serviceCenterList.forEach(center=>{
let c = [];
center.supplyList.forEach(supply => {
let chi = [];
supply.transferList.forEach(unit => {
chi.push({ value: unit.unitId, label: unit.unitName });
});
c.push({ children: chi, label: supply.supplyName});
});
options.push({children: c, label: center.serviceCenterName});
})
}else{
element.supplyList.forEach(element => {
let chi = [];
element.transferList.forEach(unit => {
chi.push({ value: unit.unitId, label: unit.unitName });
})
options.push({ children: chi, label: element.supplyName});
})
}
}
});
}
AlarmInfo.value.push(options[0].children[0].children[0].value);
}
//获取数据列表
function gettransfer() {
loading.value = true;
http.post("/api/patrol/GetPatrolTodeyData", AlarmInfo.value).then((result) => {
console.log(result.data);
if(result.data !== null){
tableData.value = result.data;
}
if(result.data === null){
tableData.value = null;
}
loading.value = false;
});
}
function setCellStyle({ row, column, rowIndex, columnIndex }) {
let css_color = {};
css_color['padding-left'] = 'px';
css_color['padding-right'] = '0px';
css_color['borderColor'] = '#97d5fd';
css_color['padding'] = '5px';
return css_color;
}
function setHeaderCellStyle({ row, column, rowIndex, columnIndex }) {
let css_color;
var backcolor = 'd9f1ff';
css_color = { 'background-color': '#' + backcolor, 'padding-left': '0px', 'padding-right': '0px', 'borderColor': '#97d5fd', 'color': '#000', 'text-align': 'center', 'vertical-align': 'top' };
var backcolor = 'd9f1ff';
css_color = { 'background-color': '#' + backcolor, 'padding-left': '0px', 'padding-right': '0px', 'borderColor': '#97d5fd', 'color': '#000', 'text-align': 'center', 'vertical-align': 'top' };
return css_color;
}
function getImgUrl(item) {
item = item.replaceAll("N",'<img style="width: 20px; height: 20px" src="/imgs/status/status_off.png" />')
item = item.replaceAll("N",'<img style="width: 20px; height: 20px" src="/imgs/status/status_run.png" />')
console.log(item)
return item;
}
onMounted(() => {
setContentHeight();
window.addEventListener('resize', setContentHeight);
})
onUnmounted(() => {
window.removeEventListener('resize', setContentHeight);
})
</script>
<style lang="less" scoped>
.moduleCard {
width: auto;
overflow: auto;
padding: 0px;
::v-deep .el-card__body {
padding: 0px;
}
}
.pagination {
padding: 4px;
margin-left: 20px;
height: 30px;
//background-color: #8939cf;
vertical-align: middle;
}
//鼠标所在行的颜色
::v-deep .el-table__body tr:hover>td {
background: linear-gradient(to top, rgb(0, 198, 255), rgb(255, 255, 255)) !important;
}
::v-deep .el-table__body tr.current-row>td {
background-color: #92cbf1 !important;
}
.card-contianer {
width: auto;
height: 70px;
.div-header {
width: 100%;
display: flex;
margin: 20px;
}
}
.el-form-item {
margin-top: -20px;
margin-right: 30px;
}
.el-tag--mini {
height: 21px !important
}
.el-cascader .el-input .el-input__inner:focus, .el-cascader .el-input.is-focus .el-input__inner{
height: 33px; //这里高度根据需求自己设定
}
.el-cascader__tags {
display: inline-flex;
margin-right: 10px;
flex-wrap: nowrap;
}
:deep(.div-form-img) {
display: flex;
align-items: center;
justify-content: center;
}
</style>
\ No newline at end of file
<template>
<el-card class="card-contianer">
<label>{{radioTitle}}</label>
<el-radio-group v-model="activeRadio" style="margin-left: 50px;">
<el-radio
v-for="(option, index) in options"
:key="index"
:label="option.value"
>
{{ option.lable }}
</el-radio>
</el-radio-group>
<div>
</div>
<label>{{radioTitle}}</label>
<el-radio-group v-model="activeRadio" style="margin-left: 50px;">
<el-radio
v-for="(option, index) in options"
:key="index"
:label="option.value"
>
{{ option.lable }}
</el-radio>
</el-radio-group>
</el-card>
<el-tabs :tab-position="tabPosition" style="height: 100%" class="demo-tabs">
<el-tab-pane label="换热站状态" v-if="isTransferStatus">
......@@ -182,7 +185,7 @@
.card-contianer {
display: flex;
width: auto;
width: 100%;
height: 50px;
align-items: center;
vertical-align: middle;
......
......@@ -151,6 +151,32 @@
<td style="text-align:center;">{{ tableDataList.diffPercent }}</td>
</tr>
</table>
<div>
<div class="btngrounp">
<el-button
type="primary"
@click="sendClick"
style="margin: 15px 0 0 0"
>打印</el-button
><el-button
type="primary"
@click="exportTableToExcel"
style="margin: 15px 0 0 10px"
>打印预览</el-button
>
<el-button
type="primary"
@click="exportTableToExcel"
style="margin: 15px 0 0 10px"
>导出</el-button
>
<router-link to="/Forecast"><el-button
type="primary"
style="margin: 15px 0 0 10px"
>返回</el-button
></router-link>
</div>
</div>
</el-card>
</div>
</div>
......@@ -250,4 +276,9 @@ table.bottomTable td {
border-bottom: #ebeef5 solid 1px;
padding: 10px 0;
}
.btngrounp {
width: 300px;
margin: 0 auto;
text-align: center;
}
</style>
\ No newline at end of file
<template>
生产与结算数据分析表
</template>
\ No newline at end of file
<template>
年度参数管理
</template>
\ No newline at end of file
<template>
锅炉参数配置
</template>
\ No newline at end of file
<template>
能源消耗
</template>
\ No newline at end of file
<template>
瞬时热量对比配置
</template>
\ No newline at end of file
<template>
天气工况
</template>
\ No newline at end of file
<template>
气象干预
</template>
\ No newline at end of file
<template>
风力配置管理
</template>
\ 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