Browse Source

1、首页添加仪表盘,展示各个设备组的eer;

2、添加日历控制一键开关机(分时段控制)、节假日自己控制;
3、热平衡记录分析(冷冻水侧与冷却水侧的能量对比、热平衡率、热平衡偏差),其中热平衡率、热平衡偏差是折线,其余是柱状图;颗粒度是每分钟显示;
4、监控界面右下角添加热平衡率实时显示;
bl_ai
selia-zx 2 weeks ago
parent
commit
d376767755
  1. 0
      git
  2. 18
      src/assets/styles/element-ui.scss
  3. 514
      src/views/centerairC/dateSwitch/index.vue
  4. 1205
      src/views/centerairC/equilibrium/index.vue
  5. 23
      src/views/centerairC/sysMonitor/monitorCenter.vue
  6. 2
      src/views/components/aircAndWindcMeter.vue
  7. 2
      src/views/components/hotWater.vue
  8. 815
      src/views/components/sysEnergy.vue
  9. 2
      src/views/components/temMeter.vue
  10. 8
      src/views/components/viewColdSys.vue
  11. 10
      src/views/index.vue

18
src/assets/styles/element-ui.scss

@ -1459,3 +1459,21 @@
font-weight: bold !important;
color: #03a249 !important;
}
.el-calendar {
background-color: #637c94 !important;
}
.el-calendar-table td.is-selected .calendar-cell {
color: #409eff !important;
font-weight: bold;
}
.el-calendar-table .el-calendar-day:hover .calendar-cell {
color: #409eff !important;
font-weight: bold;
}
.el-calendar-table thead th {
color: #d8def3 !important;
}
.el-calendar__title{
color: #ffffff !important;
font-weight: bold;
}

514
src/views/centerairC/dateSwitch/index.vue

@ -0,0 +1,514 @@
<template>
<div class="schedule-panel">
<!-- 顶部全局状态与一键开关 -->
<el-row type="flex" align="middle" class="global-header">
<el-col :span="12">
<div class="global-switch">
<span class="label">一键总开关</span>
<el-switch
v-model="globalSwitch"
active-text="开启"
inactive-text="关闭"
@change="handleGlobalSwitch"
>
</el-switch>
</div>
</el-col>
<el-col :span="12">
<div class="status-card">
<p><span class="label">当前时间</span>{{ currentTime }}</p>
<p><span class="label">今日计划</span>{{ todayPlan }}</p>
<p><span class="label">下次动作</span>{{ nextAction }}</p>
</div>
</el-col>
</el-row>
<div class="date-content">
<div class="date-left">
<!-- 中部常规时段设置周循环 -->
<el-card class="section-card">
<div slot="header" class="section-header">
<span>常规时段设置</span>
<el-radio-group v-model="scheduleMode" size="small">
<el-radio-button label="normal">普通模式</el-radio-button>
<el-radio-button label="advanced">高级模式</el-radio-button>
</el-radio-group>
</div>
<!-- 普通模式一周统一规则此处仅展示示例实际可按 mode 切换 -->
<el-form v-if="scheduleMode === 'normal'" label-width="150px">
<el-form-item label="工作日(周一~周五)">
<el-time-picker
is-range
v-model="workdayRange1"
range-separator="至"
start-placeholder="开机时间"
end-placeholder="关机时间"
format="HH:mm"
value-format="HH:mm"
>
</el-time-picker>
<span class="time-range-sep">+</span>
<el-time-picker
is-range
v-model="workdayRange2"
range-separator="至"
start-placeholder="开机时间"
end-placeholder="关机时间"
format="HH:mm"
value-format="HH:mm"
>
</el-time-picker>
</el-form-item>
<el-form-item label="周六">
<el-time-picker
is-range
v-model="saturdayRange"
range-separator="至"
start-placeholder="开机时间"
end-placeholder="关机时间"
format="HH:mm"
value-format="HH:mm"
>
</el-time-picker>
</el-form-item>
<el-form-item label="周日">
<el-checkbox v-model="sundayOff">全天关机</el-checkbox>
<el-time-picker
v-if="!sundayOff"
is-range
v-model="sundayRange"
range-separator="至"
start-placeholder="开机时间"
end-placeholder="关机时间"
format="HH:mm"
value-format="HH:mm"
>
</el-time-picker>
</el-form-item>
</el-form>
<!-- 高级模式每天独立设置简化示例可扩展为表格 -->
<el-form v-else label-width="80px">
<div v-for="day in weekDays" :key="day.value" class="daily-item">
<el-form-item :label="day.label">
<el-time-picker
is-range
v-model="day.ranges[0]"
range-separator="至"
start-placeholder="开机"
end-placeholder="关机"
format="HH:mm"
value-format="HH:mm"
size="mini"
>
</el-time-picker>
<span class="time-range-sep">+</span>
<el-time-picker
is-range
v-model="day.ranges[1]"
range-separator="至"
start-placeholder="开机"
end-placeholder="关机"
format="HH:mm"
value-format="HH:mm"
size="mini"
>
</el-time-picker>
</el-form-item>
</div>
</el-form>
</el-card>
<el-card class="section-card">
<div slot="header" class="section-header">
<span>节假日与特殊日控制</span>
<el-button type="primary" size="small" @click="dialogVisible = true"
>+ 添加例外日</el-button
>
</div>
<el-table :data="exceptionList" stripe style="width: 100%">
<el-table-column
prop="date"
label="日期"
width="120"
></el-table-column>
<el-table-column
prop="week"
label="星期"
width="80"
></el-table-column>
<el-table-column prop="type" label="类型" width="100">
<template slot-scope="scope">
<el-tag :type="scope.row.type | typeTag">{{
scope.row.type
}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="rule" label="执行规则"></el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button size="mini" @click="editException(scope.row)"
>编辑</el-button
>
<el-button
size="mini"
type="danger"
@click="deleteException(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 添加例外日的弹窗 -->
<el-dialog
title="添加例外日"
:visible.sync="dialogVisible"
width="600px"
>
<el-form label-width="80px">
<el-form-item label="日期">
<el-date-picker
v-model="newException.date"
type="date"
placeholder="选择日期"
format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
<el-form-item label="规则">
<el-radio-group v-model="newException.ruleType">
<el-radio label="off">全天关闭</el-radio>
<el-radio label="on">全天开启</el-radio>
<el-radio label="custom">自定义时段</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="newException.ruleType === 'custom'"
label="时段"
>
<el-time-picker
is-range
v-model="newException.customRange"
range-separator="至"
start-placeholder="开机"
end-placeholder="关机"
format="HH:mm"
>
</el-time-picker>
</el-form-item>
<el-form-item label="年度循环">
<el-checkbox v-model="newException.recurring"
>每年生效</el-checkbox
>
</el-form-item>
</el-form>
<span slot="footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="saveException">保存</el-button>
</span>
</el-dialog>
</el-card>
</div>
<!-- 下部节假日与特殊日控制 + 日历视图左右布局 -->
<div class="date-right exception-section">
<el-card class="section-card">
<div slot="header" class="section-header">
<span>日历视图</span>
<el-button type="text" @click="syncHolidays">同步节假日</el-button>
</div>
<!-- 日历组件v-model 绑定当前显示的月份 -->
<el-calendar v-model="calendarDate">
<!-- 作用域插槽使用 slot-scope="scope" 访问 scope.data -->
<template slot="dateCell" slot-scope="scope">
<div class="calendar-cell" :class="getDayClass(scope.data.day)">
<!-- 显示月-去掉年份 -->
{{ scope.data.day.split("-").slice(1).join("-") }}
</div>
</template>
</el-calendar>
</el-card>
</div>
</div>
<!-- 底部操作按钮与优先级说明 -->
<el-row
type="flex"
justify="space-between"
align="middle"
class="footer-actions"
>
<el-col :span="12">
<div class="priority-note">
优先级特殊日规则 > 节假日规则 > 周循环规则
</div>
</el-col>
<el-col :span="12" class="text-right">
<el-button @click="handleCancel">取消</el-button>
<span class="div-primary" style="margin-left: 10px"
><el-button type="primary" @click="handleSave">保存</el-button></span
>
</el-col>
</el-row>
</div>
</template>
<script>
//
export default {
name: "EnergySchedule",
data() {
return {
globalSwitch: true,
currentTime: "2024-03-20 14:30 星期三",
todayPlan: "08:00 - 17:30",
nextAction: "下次开机 明天 08:00",
scheduleMode: "normal", // normal / advanced
//
workdayRange1: ["08:00", "12:00"],
workdayRange2: ["13:00", "17:30"],
saturdayRange: ["09:00", "12:00"],
sundayOff: true,
sundayRange: [],
//
weekDays: [
{
label: "周一",
value: 1,
ranges: [
["08:00", "12:00"],
["13:00", "17:30"],
],
},
{
label: "周二",
value: 2,
ranges: [
["08:00", "12:00"],
["13:00", "17:30"],
],
},
{
label: "周三",
value: 3,
ranges: [
["08:00", "12:00"],
["13:00", "17:30"],
],
},
{
label: "周四",
value: 4,
ranges: [
["08:00", "12:00"],
["13:00", "17:30"],
],
},
{
label: "周五",
value: 5,
ranges: [
["08:00", "12:00"],
["13:00", "17:30"],
],
},
{ label: "周六", value: 6, ranges: [["09:00", "12:00"], []] },
{ label: "周日", value: 0, ranges: [[], []] },
],
data: {
day: "2025-03-03",
},
//
exceptionList: [
{
date: "2024-05-01",
week: "周三",
type: "法定节假日",
rule: "全天关闭",
},
{
date: "2024-05-04",
week: "周六",
type: "调休日",
rule: "按工作日规则",
},
],
// 使 "MM-DD"
holidayRules: [
{ date: "05-01", type: "holiday" }, //
{ date: "05-04", type: "workday" }, //
{ date: "10-01", type: "holiday" }, //
],
dialogVisible: false,
newException: {
date: "",
ruleType: "off",
customRange: [],
recurring: false,
},
calendarDate: new Date(),
};
},
filters: {
typeTag(type) {
if (type.includes("法定")) return "danger";
if (type.includes("调休")) return "warning";
return "info";
},
},
methods: {
handleGlobalSwitch(val) {
console.log("一键开关:", val);
},
editException(row) {
console.log("编辑", row);
},
deleteException(row) {
console.log("删除", row);
//
},
syncHolidays() {
console.log("同步国家法定节假日");
},
/**
* 根据日期字符串 'YYYY-MM-DD' 返回对应的样式类名
* @param {string} dayStr - 格式如 '2024-03-20'
* @returns {string} 样式类名 'holiday' 'workday'
*/
getDayClass(dayStr) {
// - '2024-05-01' '05-01'
const monthDay = dayStr.slice(5); // dayStr.split('-').slice(1).join('-')
//
const rule = this.holidayRules.find((item) => item.date === monthDay);
//
return rule ? rule.type : "";
},
/**
* 模拟同步节假日按钮功能
* 实际开发中可调用接口更新 holidayRules
*/
syncHolidays() {
//
// this.holidayRules = [...];
this.$message.success("节假日规则已同步");
},
handleSave() {
console.log("保存所有设置");
this.$message.success("设置已保存");
},
handleCancel() {
console.log("取消");
},
},
};
</script>
<style scoped>
.schedule-panel {
padding: 0px 20px 20px 20px;
/* background-color: #f5f7fa; */
min-width: 1000px;
}
.global-header {
/* background-color: #fff; */
padding: 5px 20px;
border-radius: 4px;
margin-bottom: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.global-switch .label {
font-weight: bold;
margin-right: 15px;
}
.status-card {
border-left: 2px solid #409eff;
padding-left: 15px;
}
.status-card p {
margin: 5px 0;
font-size: 14px;
}
.status-card .label {
color: #909399;
}
.section-card {
margin-bottom: 20px;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
font-weight: bold;
}
.time-range-sep {
margin: 0 10px;
color: #aaa;
}
.daily-item {
margin-bottom: 10px;
}
.calendar-cell {
height: 60px;
display: flex;
align-items: center;
justify-content: center;
}
.calendar-cell.holiday {
background-color: #fde2e2;
color: #f56c6c;
border-radius: 4px;
}
.calendar-cell.workday {
background-color: #d8def3;
color: #67c23a;
border-radius: 4px;
}
.footer-actions {
background-color: #0962aa;
padding: 15px 20px;
border-radius: 4px;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}
.priority-note {
color: #ffffff;
font-size: 13px;
}
.text-right {
text-align: right;
}
.date-content {
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.date-left {
width: 59%;
display: flex;
flex-direction: column;
}
.date-right {
width: 40%;
}
.el-calendar {
background-color: #637c94 !important;
}
.el-calendar-table td.is-selected .calendar-cell {
color: #409eff !important;
font-weight: bold;
}
.el-calendar-table .el-calendar-day:hover .calendar-cell {
color: #409eff !important;
font-weight: bold;
}
.el-calendar-table thead th {
color: #d8def3 !important;
}
.el-calendar__title {
color: #ffffff !important;
font-weight: bold;
}
</style>

1205
src/views/centerairC/equilibrium/index.vue

File diff suppressed because it is too large Load Diff

23
src/views/centerairC/sysMonitor/monitorCenter.vue

@ -113,6 +113,17 @@
<span class="deepColor">{{ performanceObj.yearCold }}</span>
<span>kw</span>
</div>
<div class="weather-li">
<span>热平衡率</span>
<span class="deepColor">82</span>
<span>%</span>
</div>
<div class="weather-li">
<span>热平衡偏差</span>
<span class="deepColor">1.8</span>
<span>%</span>
<span class="normal">校验通过</span>
</div>
</div>
</div>
<!-- 主机加减载时间 -->
@ -4138,12 +4149,18 @@ export default {
font-family: DIN;
font-size: 0.25rem;
}
.normal {
font-size: 0.13rem;
color: #007bff;
font-weight: bold;
margin-left: 0.1rem;
}
}
.performance {
position: absolute;
top: 6.1rem !important;
right: -0.6rem !important;
top: 5.4rem !important;
right: -1.2rem !important;
display: flex;
flex-direction: column;
align-items: flex-start;
@ -4151,7 +4168,7 @@ export default {
font-size: 0.16rem;
}
.perdformance-bg {
width: 2.85rem;
width: 2.95rem;
z-index: 10;
display: flex;
flex-direction: column;

2
src/views/components/aircAndWindcMeter.vue

@ -9,7 +9,7 @@ import * as echarts from "echarts";
export default {
props: {
subData: {
type: Array,
// type: Array,
required: true,
},
},

2
src/views/components/hotWater.vue

@ -45,7 +45,7 @@
export default {
props: {
subData: {
type: Array,
// type: Array,
required: true,
},
},

815
src/views/components/sysEnergy.vue

@ -0,0 +1,815 @@
<template>
<div class="sys_content">
<div class="sys_charts" ref="sys_charts"></div>
<div class="score">
<div class="excellent">优秀</div>
<div class="good">良好</div>
<div class="bad"></div>
<div class="improve">需要改进</div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
export default {
data() {
return {
data1: "0",
data2: "0",
data3: "0",
data4: "0",
data5: "0",
chartInstance2: null,
option2: {},
};
},
mounted() {
this.initChart2();
this.getCoe();
this.screenAdapter2();
window.addEventListener("resize", this.screenAdapter2);
// this.nowData()
},
destroyed() {
//mounted
window.removeEventListener("resize", this.screenAdapter2);
},
methods: {
//chartInstance2 线
initChart2() {
const titleFontSize = this.$refs.sys_charts.offsetWidth / 130;
this.chartInstance2 = echarts.init(this.$refs.sys_charts);
this.option2 = {
tooltip: {
//
formatter: "{a} <br/>{b} : {c}",
},
// cavas
// backgroundColor: "#f5f5f5",
series: [
{
//
name: "实时EER系数",
type: "gauge",
radius: "65%", // :number, string , 75%
center: ["48%", "40%"],
startAngle: 180,
endAngle: 0,
clockWise: true,
min: 0,
max: 15,
splitNumber: 4, // , 10
axisTick: {
// (线)
distance: titleFontSize * 0.2,
length: titleFontSize,
show: true, // (线), true
splitNumber: 5, // 线, 5
lineStyle: {
// 线
color: "auto", //线, #eee
opacity: 1, // 0 1 0
width: titleFontSize * 0.1,
type: "solid", //线, solid dashed,dotted
// shadowBlur: 10, //() shadowColor,shadowOffsetX, shadowOffsetY
// shadowColor: "#fff", //color
},
},
pointer: {
length: "40%", //
width: titleFontSize * 0.4,
offsetCenter: ["0", "-20%"], //
itemStyle: {
color: "auto", // 线
},
},
axisLine: {
// 线(线)
show: true, // 线(线), true
lineStyle: {
// 线
width: titleFontSize,
// color: colorTemplate1, //线 ([0,1]) [[0.2, '#91c7ae'], [0.8, '#63869e'], [1, '#c23531']]
// opacity: 1, // 0 1 0
// shadowBlur: 20, //() shadowColor,shadowOffsetX, shadowOffsetY
// shadowColor: "#fff", //color
color: [
// 线
[0.35, "#ffb219"],
[0.38, "#00be97"],
[1, "#208fff"],
],
},
},
splitLine: {
// 线
distance: titleFontSize * 0.35,
show: true, // 线, true
length: titleFontSize,
lineStyle: {
// 线
color: "auto", //线, #eee
opacity: 1, // 0 1 0
width: titleFontSize * 0.2,
type: "solid", //线, solid dashed,dotted
// shadowBlur: 10, //() shadowColor,shadowOffsetX, shadowOffsetY
// shadowColor: "#fff", //color
},
},
axisLabel: {
show: true, // , true
fontSize: titleFontSize * 1.5,
distance: titleFontSize * 1.5,
color: "inherit",
},
title: {
color: "#ffffff",
fontSize: titleFontSize * 2,
offsetCenter: ["-30%", "20%"], //
},
detail: {
valueAnimation: true,
animationDuration: 2000,
color: "#c5fff3",
fontSize: titleFontSize * 2,
offsetCenter: ["28%", "20%"], //
},
data: [
{
value: 0,
name: "主机",
},
],
},
{
//
name: "实时EER系数",
type: "gauge",
radius: "65%",
center: ["48%", "90%"],
startAngle: 180,
endAngle: 0,
clockWise: true,
min: 0,
max: 120,
splitNumber: 4,
axisTick: {
distance: titleFontSize * 0.2,
show: true,
splitNumber: 5,
length: titleFontSize,
lineStyle: {
color: "auto",
opacity: 1,
width: titleFontSize * 0.1,
type: "solid",
},
},
pointer: {
length: "40%",
width: titleFontSize * 0.4, //
offsetCenter: [0, "-25%"],
itemStyle: {
color: "auto",
},
},
axisLine: {
show: true,
lineStyle: {
width: titleFontSize,
color: [
[0.407, "#ffb219"],
[0.446, "#00be97"],
[1, "#208fff"],
],
},
},
splitLine: {
distance: titleFontSize * 0.35,
show: true,
length: titleFontSize,
lineStyle: {
color: "auto",
opacity: 1,
width: titleFontSize * 0.2,
type: "solid",
},
},
axisLabel: {
show: true,
fontSize: titleFontSize * 1.5, //线
distance: titleFontSize * 1.5,
color: "inherit",
},
title: {
fontSize: titleFontSize * 2,
offsetCenter: ["-33%", "20%"],
color: "#ffffff",
},
detail: {
valueAnimation: true,
animationDuration: 2000,
color: "#c5fff3",
fontSize: titleFontSize * 2,
offsetCenter: ["28%", "20%"], //
},
data: [
{
value: 0,
name: "冷却塔",
},
],
},
{
//
name: "实时EER系数",
type: "gauge",
detail: { formatter: "{value}" },
radius: "90%",
center: ["15%", "55%"],
startAngle: 225,
endAngle: -45,
clockWise: true,
min: 0,
max: 10,
splitNumber: 4,
axisTick: {
distance: titleFontSize * 0.4,
show: true,
splitNumber: 5,
length: titleFontSize * 1.2,
lineStyle: {
color: "auto",
opacity: 1,
width: titleFontSize * 0.2,
type: "solid",
},
},
axisLabel: {
color: "inherit",
fontSize: titleFontSize * 1.8,
distance: titleFontSize * 3,
},
pointer: {
width: titleFontSize * 0.6,
itemStyle: {
color: "auto",
},
},
axisLine: {
show: true,
lineStyle: {
width: titleFontSize * 1.6,
color: [
[0.35, "#ee5e5e"],
[0.415, "#ffb219"],
[0.5, "#00be97"],
[1, "#208fff"],
],
},
},
splitLine: {
distance: titleFontSize * 0.35,
show: true,
length: titleFontSize * 2,
lineStyle: {
color: "auto",
opacity: 1,
width: titleFontSize * 0.2,
type: "solid",
},
},
title: {
fontSize: titleFontSize * 2.6,
color: "#ffffff",
offsetCenter: ["-25%", "90%"], //
},
detail: {
valueAnimation: true,
animationDuration: 2000,
color: "#c5fff3",
fontSize: titleFontSize * 2.6,
offsetCenter: ["35%", "90%"], //
},
data: [
{
value: 0,
name: "系统EER",
},
],
},
{
//
name: "实时EER系数",
type: "gauge",
radius: "65%",
center: ["75%", "40%"],
startAngle: 180,
endAngle: 0,
clockWise: true,
min: 0,
max: 100,
splitNumber: 4,
axisTick: {
distance: titleFontSize * 0.2,
show: true,
splitNumber: 5,
length: titleFontSize,
lineStyle: {
color: "auto",
opacity: 1,
width: titleFontSize * 0.1,
type: "solid",
},
},
pointer: {
length: "40%",
width: titleFontSize * 0.4, //
offsetCenter: [0, "-20%"],
// width: 3.5, //
itemStyle: {
color: "auto",
},
},
axisLine: {
show: true,
lineStyle: {
width: titleFontSize,
color: [
[0.417, "#ffb219"],
[0.459, "#00be97"],
[1, "#208fff"],
],
},
},
splitLine: {
show: true,
distance: titleFontSize * 0.35,
length: titleFontSize,
lineStyle: {
color: "auto",
opacity: 1,
width: titleFontSize * 0.2,
type: "solid",
},
},
axisLabel: {
show: true,
fontSize: titleFontSize * 1.5,
distance: titleFontSize * 1.5,
color: "inherit",
},
title: {
fontSize: titleFontSize * 2,
offsetCenter: ["-33%", "20%"],
color: "#ffffff",
},
detail: {
valueAnimation: true,
animationDuration: 2000,
color: "#c5fff3",
fontSize: titleFontSize * 2,
offsetCenter: ["28%", "20%"], //
},
data: [
{
value: 0,
name: "冷冻泵",
},
],
},
{
//
name: "实时EER系数",
type: "gauge",
radius: "65%",
center: ["75%", "90%"],
startAngle: 180,
endAngle: 0,
clockWise: true,
min: 0,
max: 60,
splitNumber: 4,
axisTick: {
distance: titleFontSize * 0.2,
show: true,
splitNumber: 5,
length: titleFontSize,
lineStyle: {
color: "auto",
opacity: 1,
width: titleFontSize * 0.1,
type: "solid",
},
},
pointer: {
length: "40%",
width: titleFontSize * 0.4, //
offsetCenter: [0, "-20%"],
itemStyle: {
color: "auto",
},
},
axisLine: {
show: true,
lineStyle: {
width: titleFontSize,
color: [
[0.813, "#ffb219"],
[0.892, "#00be97"],
[1, "#208fff"],
],
},
},
splitLine: {
distance: titleFontSize * 0.35,
show: true,
length: titleFontSize,
lineStyle: {
color: "auto",
opacity: 1,
width: titleFontSize * 0.2,
type: "solid",
},
},
axisLabel: {
show: true,
fontSize: titleFontSize * 1.5,
distance: titleFontSize * 1.5,
color: "inherit",
},
title: {
fontSize: titleFontSize * 2,
offsetCenter: ["-33%", "20%"],
color: "#ffffff",
},
detail: {
valueAnimation: true,
animationDuration: 2000,
color: "#c5fff3",
fontSize: titleFontSize * 2,
offsetCenter: ["28%", "20%"], //
},
data: [
{
value: 0,
name: "冷却泵",
},
],
},
],
};
//
this.chartInstance2.setOption(this.option2, true);
},
//
nowData() {
//option.series[0].data[0].value使random()
this.option2.series[0].data[0].value = (Math.random() * 7).toFixed(2);
this.option2.series[1].data[0].value = (Math.random() * 10).toFixed(2);
this.option2.series[2].data[0].value = (Math.random() * 2).toFixed(2);
this.option2.series[3].data[0].value = (Math.random() * 2).toFixed(2);
this.option2.series[4].data[0].value = (Math.random() * 10).toFixed(2);
this.chartInstance2.setOption(this.option2, true);
setInterval(this.nowData, 100000);
this.clear();
},
clear() {
clearInterval(this.nowData);
this.nowData = null;
},
screenAdapter2() {
const titleFontSize = this.$refs.sys_charts.offsetWidth / 130;
const adapterOption = {
series: [
{
//
name: "实时EER系数",
type: "gauge",
axisTick: {
// (线)
distance: titleFontSize * 0.2, //线
length: titleFontSize, // 线, 8
lineStyle: {
// 线
width: titleFontSize * 0.1, //线, 1
},
},
pointer: {
width: titleFontSize * 0.4, //
},
axisLine: {
// 线(线)
lineStyle: {
// 线
width: titleFontSize, //线, 30
},
},
splitLine: {
// 线
distance: titleFontSize * 0.35, //线
length: titleFontSize, // 线线, 30
lineStyle: {
// 线
width: titleFontSize * 0.2, //线, 2
},
},
axisLabel: {
fontSize: titleFontSize * 1.5,
distance: titleFontSize * 1.5, // 线, 5
},
title: {
fontSize: titleFontSize * 1.5,
},
detail: {
fontSize: titleFontSize * 1.5,
},
},
{
//
name: "实时EER系数",
type: "gauge",
axisTick: {
// (线)
distance: titleFontSize * 0.2, //线
length: titleFontSize, // 线, 8
lineStyle: {
// 线
width: titleFontSize * 0.1, //线, 1
},
},
pointer: {
width: titleFontSize * 0.4, //
},
axisLine: {
// 线(线)
lineStyle: {
// 线
width: titleFontSize, //线, 30
},
},
splitLine: {
// 线
distance: titleFontSize * 0.35, //线
length: titleFontSize, // 线线, 30
lineStyle: {
// 线
width: titleFontSize * 0.2, //线, 2
},
},
axisLabel: {
fontSize: titleFontSize * 1.5,
distance: titleFontSize * 1.5, // 线, 5
},
title: {
fontSize: titleFontSize * 1.5,
},
detail: {
fontSize: titleFontSize * 1.5,
},
},
{
//
name: "实时EER系数",
type: "gauge",
axisTick: {
// (线)
distance: titleFontSize * 0.4, //线
length: titleFontSize * 1.2, // 线, 8
lineStyle: {
// 线
width: titleFontSize * 0.2, //线, 1
},
},
pointer: {
width: titleFontSize * 0.6, //
},
axisLine: {
// 线(线)
lineStyle: {
// 线
width: titleFontSize * 1.6, //线, 30
},
},
splitLine: {
// 线
distance: titleFontSize * 0.35, //线
length: titleFontSize * 2, // 线线, 30
lineStyle: {
// 线
width: titleFontSize * 0.2, //线, 2
},
},
axisLabel: {
fontSize: titleFontSize * 1.8,
distance: titleFontSize * 3, // 线, 5
},
title: {
fontSize: titleFontSize * 2.2,
},
detail: {
fontSize: titleFontSize * 2.2,
},
},
{
//
name: "实时EER系数",
type: "gauge",
axisTick: {
// (线)
distance: titleFontSize * 0.2, //线
length: titleFontSize, // 线, 8
lineStyle: {
// 线
width: titleFontSize * 0.1, //线, 1
},
},
pointer: {
width: titleFontSize * 0.4, //
},
axisLine: {
// 线(线)
lineStyle: {
// 线
width: titleFontSize, //线, 30
},
},
splitLine: {
// 线
distance: titleFontSize * 0.35, //线
length: titleFontSize, // 线线, 30
lineStyle: {
// 线
width: titleFontSize * 0.2, //线, 2
},
},
axisLabel: {
fontSize: titleFontSize * 1.5,
distance: titleFontSize * 1.5, // 线, 5
},
title: {
fontSize: titleFontSize * 1.5,
},
detail: {
fontSize: titleFontSize * 1.5,
},
},
{
//
name: "实时EER系数",
type: "gauge",
axisTick: {
// (线)
distance: titleFontSize * 0.2, //线
length: titleFontSize, // 线, 8
lineStyle: {
// 线
width: titleFontSize * 0.1, //线, 1
},
},
pointer: {
width: titleFontSize * 0.4, //
},
axisLine: {
// 线(线)
lineStyle: {
// 线
width: titleFontSize, //线, 30
},
},
splitLine: {
// 线
distance: titleFontSize * 0.35, //线
length: titleFontSize, // 线线, 30
lineStyle: {
// 线
width: titleFontSize * 0.2, //线, 2
},
},
axisLabel: {
fontSize: titleFontSize * 1.5,
distance: titleFontSize * 1.5, // 线, 5
},
title: {
fontSize: titleFontSize * 1.5,
},
detail: {
fontSize: titleFontSize* 1.5,
},
},
],
};
this.chartInstance2.setOption(adapterOption);
this.chartInstance2.resize();
},
//
//
getCoe() {
// this.$api.homeScreen.getCoe().then((res) => {
// console.log("", res)
// if (res.code == 200) {
// this.data1 = res.data.sysCoe || this.data1;
// this.data2 = res.data.chillerCoe || this.data2;
// this.data3 = res.data.chillPumpCoe || this.data3;
// this.data4 = res.data.coolPumpCoe || this.data4;
// this.data5 = res.data.towerCoe || this.data5;
// this.option2.series[0].data[0].value = this.data2;
// this.option2.series[1].data[0].value = this.data5;
// this.option2.series[2].data[0].value = this.data1;
// this.option2.series[3].data[0].value = this.data3;
// this.option2.series[4].data[0].value = this.data4;
// this.chartInstance2.setOption(this.option2, true);
// }
// })
this.data1 = 8.0;
this.data2 = 0;
this.data3 = 8.17;
this.data4 = 0;
this.data5 = 0;
this.option2.series[0].data[0].value = this.data2;
this.option2.series[1].data[0].value = this.data5;
this.option2.series[2].data[0].value = this.data1;
this.option2.series[3].data[0].value = this.data3;
this.option2.series[4].data[0].value = this.data4;
this.chartInstance2.setOption(this.option2, true);
},
},
};
</script>
<style lang="scss" scoped>
.sys_content {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
height: 300px;
.sys_title {
width: 15%;
font-size: 0.2rem;
margin: 0.1rem 0 0 0.2rem;
display: flex;
flex-direction: column;
color: #c5fff3;
}
.sys_charts {
width: 85%;
height: 250px;
margin-top: 0.2rem;
}
.score {
width: 10%;
height: 100%;
// display: flex;
// flex-direction: column;
// justify-content: space-between;
font-size: 0.18rem;
color: #ffffff;
margin: 0.6rem 0.6rem 0 0;
.excellent,
.good,
.bad,
.improve {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 0.1rem;
white-space: nowrap;
}
.excellent::before,
.good::before,
.bad::before,
.improve::before {
display: block;
content: "";
width: 0.15rem;
height: 0.14rem;
margin-right: 0.16rem;
}
.excellent::before {
background-color: #208fff;
}
.good::before {
background-color: #00be97;
}
.bad::before {
background-color: #ffb219;
}
.improve::before {
background-color: #ee5e5e;
}
}
}
</style>

2
src/views/components/temMeter.vue

@ -9,7 +9,7 @@ import * as echarts from "echarts";
export default {
props: {
subData: {
type: Array,
// type: Array,
required: true,
},
},

8
src/views/components/viewColdSys.vue

@ -11,7 +11,7 @@ import * as echarts from "echarts";
export default {
props: {
subData: {
type: Object,
// type: Object,
required: true,
},
title: "",
@ -86,7 +86,8 @@ export default {
//chartInstance2 线
initChart() {
this.chartInstance = echarts.init(this.$refs.sys_charts);
var dataArr = this.subData.curValue; //
// var dataArr = this.subData.curValue; //
var dataArr = 8
var maxData = 10; //
this.option = {
// backgroundColor: "#0E1327",
@ -358,7 +359,8 @@ export default {
echartsData() {
if (this.subData.length > 0) {
this.useForm.maxData = 10;
this.useForm.useData = this.subData[0].value;
// this.useForm.useData = this.subData[0].value;
this.useForm.useData = 8;
let that = this;
// 使
const axisLineColor = this.getAxisLineColor(

10
src/views/index.vue

@ -148,6 +148,12 @@
<tem-meter :subData="temSys"></tem-meter>
</div>
</div>
<div class="special-div" style="margin-top: 16px">
<div class="special-top">
<div class="special-title">实时EER系数</div>
</div>
<sys-energy></sys-energy>
</div>
<el-dialog
:visible.sync="dialogVisible"
title="上传图片"
@ -195,6 +201,7 @@ import ViewColdSys from "./components/viewColdSys.vue";
import HotWater from "./components/hotWater.vue";
import AircAndWindcMeter from "./components/aircAndWindcMeter.vue";
import TemMeter from "./components/temMeter.vue";
import SysEnergy from './components/sysEnergy.vue';
export default {
components: {
@ -203,6 +210,7 @@ export default {
HotWater,
AircAndWindcMeter,
TemMeter,
SysEnergy,
},
data() {
return {
@ -382,7 +390,7 @@ export default {
});
},
goEnergy() {
this.$router.push("/comprehensiveEnergy/systemEnergy")
this.$router.push("/comprehensiveEnergy/systemEnergy");
},
//chartInstance
initChart() {

Loading…
Cancel
Save