代码提交_3_1

This commit is contained in:
lixiaobang 2024-03-01 08:13:11 +08:00
parent 8a3389e3cb
commit a0fed8af8a
5 changed files with 49 additions and 19 deletions

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import {ref, reactive} from "vue"; import {ref, reactive,onMounted} from "vue";
import getPath from "@/utils/getPath.js"; import getPath from "@/utils/getPath.js";
import dialogBox from './components/dialogBox.vue' import dialogBox from './components/dialogBox.vue'
const systemNumList = ref([ const systemNumList = ref([
@ -166,6 +166,13 @@ const openDialog = (name) =>{
const closeDialog = (val) =>{ const closeDialog = (val) =>{
dialogBoxShow.value = val dialogBoxShow.value = val
} }
//
const controlBtn = ref('on')
const toggleControl = (event) => {
controlBtn.value = event.srcElement.className
}
onMounted(()=>{
})
</script> </script>
<template> <template>
@ -259,6 +266,11 @@ const closeDialog = (val) =>{
<!-- 维护提醒--> <!-- 维护提醒-->
<div class="title margin10"> <div class="title margin10">
<span>维护提醒</span> <span>维护提醒</span>
<p class="control-btn">
<span :class="controlBtn==='on'?'select':''" class="on" @click="toggleControl">已超期</span>
<span :class="controlBtn==='off'?'select':''" class="off" style="margin-left: .7rem"
@click="toggleControl">即将开始</span>
</p>
</div> </div>
<div id="reminder" class="margin10 box-bg"> <div id="reminder" class="margin10 box-bg">
<div class="runningState"> <div class="runningState">
@ -517,4 +529,22 @@ const closeDialog = (val) =>{
width: 13px; width: 13px;
background: rgba(80, 233, 83, 1); background: rgba(80, 233, 83, 1);
} }
.control-btn {
display: flex;
.select {
background-image: url("@/assets/images/air-tab-select.png") !important;
}
span {
background-image: url("@/assets/images/air-tab.png");
cursor: pointer;
font-family: normal;
color: rgba(221, 255, 253, 1);
background-size: 100% 100%;
font-size: 0.8rem;
padding: 0.2rem 1.1rem;
}
}
</style> </style>

View File

@ -103,17 +103,17 @@ const overviewList = ref([
{ {
name: "总排放量", name: "总排放量",
num: 83, num: 83,
unit: "万tCO2", unit: "万tCO",
}, },
{ {
name: "碳抵消量", name: "碳抵消量",
num: 83, num: 83,
unit: "万tCO2", unit: "万tCO",
}, },
{ {
name: "碳减排量", name: "碳减排量",
num: 83, num: 83,
unit: "万tCO2", unit: "万tCO",
}, },
]); ]);
// //
@ -175,7 +175,7 @@ function getCarbonTrends() {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "单位:万tCO2", name: "单位:万tCO",
nameTextStyle: { nameTextStyle: {
color: "#DDFFFD", color: "#DDFFFD",
// align: "right", // align: "right",
@ -379,7 +379,7 @@ const getCarbonIntensity=()=> {
}, },
yAxis: { yAxis: {
type: "value", type: "value",
name: "单位:万tCO2/人·年", name: "单位:万tCO/人·年",
nameTextStyle: { nameTextStyle: {
color: "#DDFFFD", color: "#DDFFFD",
padding: [0, 0, 0, 35], padding: [0, 0, 0, 35],
@ -610,7 +610,7 @@ const getCarbonEmissionStatistics = ()=> {
textStyle: {}, textStyle: {},
formatter: function (value) { formatter: function (value) {
return ( return (
"{a|" + (value / 10000).toLocaleString() + "}" + "{b|万tCO2}" "{a|" + (value / 10000).toLocaleString() + "}" + "{b|万tCO}"
); );
}, },
rich: { rich: {
@ -771,27 +771,27 @@ const drawEnergyFlow = () => {
{ {
name: "电", name: "电",
nameValue: 1562, nameValue: 1562,
valueUnit: "万tCO2", valueUnit: "万tCO",
}, },
{ {
name: "空调", name: "空调",
nameValue: 562, nameValue: 562,
valueUnit: "万tCO2", valueUnit: "万tCO",
}, },
{ {
name: "照明", name: "照明",
nameValue: 490, nameValue: 490,
valueUnit: "万tCO2", valueUnit: "万tCO",
}, },
{ {
name: "电梯", name: "电梯",
nameValue: 510, nameValue: 510,
valueUnit: "万tCO2", valueUnit: "万tCO",
}, },
{ {
name: "其他", name: "其他",
nameValue:320, nameValue:320,
valueUnit: "万tCO2", valueUnit: "万tCO",
}, },
]; ];
let sangjiColor = [ let sangjiColor = [

View File

@ -149,7 +149,7 @@ const drawTotalChart = () => {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "单位:kW", name: "单位:kWh",
// padding:[0,10,0,0], // padding:[0,10,0,0],
nameTextStyle: { nameTextStyle: {
color: "#DDFFFD", color: "#DDFFFD",

View File

@ -85,7 +85,7 @@ const getRealTimeLoad = ()=> {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "单位:kW/h", name: "单位:kWh",
nameTextStyle: { nameTextStyle: {
color: "#DDFFFD", color: "#DDFFFD",
}, },
@ -270,7 +270,7 @@ const getDailyElectricityConsumption = () => {
}, },
yAxis: { yAxis: {
type: "value", type: "value",
name: "单位:kW/h", name: "单位:kWh",
nameTextStyle: { nameTextStyle: {
color: "#DDFFFD", color: "#DDFFFD",
padding:[0,5,0,0] padding:[0,5,0,0]

View File

@ -8,12 +8,12 @@ import getPath from "@/utils/getPath.js";
const realTimeLoad = ref([ const realTimeLoad = ref([
{pic:getPath.roomnum,name:'配电室数量',value:8,unit:'个'}, {pic:getPath.roomnum,name:'配电室数量',value:8,unit:'个'},
{pic:getPath.WL,name:'实时负荷',value:1465.2,unit:'kW'}, // {pic:getPath.WL,name:'实时负荷',value:1465.2,unit:'kW'}, //
{pic:getPath.E,name:'今日电量',value:146,unit:'kW/h'}, // {pic:getPath.E,name:'今日电量',value:146,unit:'kWh'}, //
]) ])
// //
const weatherStation = ref([ const weatherStation = ref([
{pic:getPath.rain,name:'雨量',value:100,unit:'mm'}, {pic:getPath.rain,name:'雨量',value:100,unit:'mm'},
{pic:getPath.rainsnow,name:'雨雪',value:'实际取值',unit:'kW'}, {pic:getPath.rainsnow,name:'雨雪',value:'实际取值',unit:''},
{pic:getPath.wind,name:'风向',value:'东南风'}, {pic:getPath.wind,name:'风向',value:'东南风'},
{pic:getPath.illuminance,name:'光照度',value:101,unit:'lux'}, {pic:getPath.illuminance,name:'光照度',value:101,unit:'lux'},
{pic:getPath.windspeed,name:'风速',value:'东南风3级'}, {pic:getPath.windspeed,name:'风速',value:'东南风3级'},
@ -83,7 +83,7 @@ const drawPowerEcharts = () =>{
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name:"单位:kW/h", name:"单位:kWh",
nameTextStyle:{ nameTextStyle:{
color: "#DDFFFD", color: "#DDFFFD",
}, },
@ -413,7 +413,7 @@ function getCarbonEmission() {
}, },
yAxis: { yAxis: {
type: "value", type: "value",
name: "单位:kW/h", name: "单位:kWh",
nameTextStyle: { nameTextStyle: {
color: "#DDFFFD", color: "#DDFFFD",
padding:[0,5,0,0] padding:[0,5,0,0]