Merge remote-tracking branch 'origin/master'

master
魔神煜修罗皇 2 years ago
commit fd57e46546
  1. 157
      psdc-ui/src/views/analyse/nhdb/index.vue
  2. 4
      psdc-ui/src/views/analyse/nhfx/index.vue
  3. 34
      psdc-ui/src/views/bigview/index.vue
  4. 13
      psdc-ui/src/views/control/manual/index.vue

@ -1,7 +1,7 @@
<template>
<div class="app-container home">
<div class="overflow">
<el-card class="box-card" v-for="item in data.celueInfoList">
<el-card class="box-card" v-for="(item,index) in data.celueInfoList" :key="index">
<template #header>
<div class="card-header">
<img :src="imgSrc" alt="">
@ -38,7 +38,9 @@
<el-input v-model="item.sceneUseEnergy" readonly/>
</el-form-item>
</el-form>
<!-- <div class="echart"></div>-->
<div class="echartBox">
<div class="echart" :id="`forId${index}`"></div>
</div>
</div>
</el-card>
</div>
@ -46,8 +48,9 @@
</template>
<script name="Index" setup>
import {getCelueList} from '@/api/analyse/nhdb/nhdb'
import {ref,reactive,onMounted} from 'vue'
import * as echarts from "echarts";
import {getCelueList} from '@/api/analyse/nhdb/nhdb'
const imgSrc = ref('../src/assets/images/策略icon.png')
const data = reactive({
@ -212,9 +215,16 @@ const data = reactive({
})
onMounted(()=>{
getCelueListFun()
getCelueListFun();
forId();
setTimeout(()=>{
indoorChartFun();
},300)
})
//
function getCelueListFun(){
getCelueList().then((res)=>{
for(let i = 0;i < res.data.length;i++){
@ -230,6 +240,119 @@ function getCelueListFun(){
})
}
//ID
function forId(index){
return 'chart' + index;
}
//线
let indoorChart;
function indoorChartFun(){
for(let i = 0;i < data.celueInfoList.length;i++){
var temp = 'forId' + i;
console.log(data.celueInfoList[i].tempInAry.listTempIn)
console.log(data.celueInfoList[i].tempInAry.timesIn)
const chartDom = document.getElementById(temp)
indoorChart = echarts.init(chartDom);
const option = {
legend: {
data: ["室内温度"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7",
fontSize:14
}
},
tooltip: {
trigger: "axis",
formatter: function(params) {
var result = params[0].name + '<br>'; //
for (var i = 0; i < params.length; i++) {
var seriesName = params[i].seriesName; //
var value = params[i].value; //
result += seriesName + ': ' + '<strong style="color: #F5901A">'+value+'</strong>' + '℃<br>'; //
}
return result;
},
// borderColor: '#00fcff',
borderWidth: 1
},
grid:{
show: true,
top: '20%',
bottom:'13%',
left:'6%',
right:'4%',
borderWidth: 0,
borderColor: '#767da1',
},
xAxis: {
type: 'category',
data: data.celueInfoList[i].tempInAry.timesIn,
axisLabel: {
textStyle: {
color: "#b6bee7",
fontSize:12
}
},
axisLine: {
lineStyle: {
color: '#767da180' // x线
}
},
axisTick: {
show: true // x
},
splitArea: {
show: false,
interval:0,
areaStyle: {
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
// name:'',
nameTextStyle: {
color: "#b6bee7",
fontSize:12,
nameLocation: "start"
},
axisLabel: {
textStyle: {
color: "#b6bee7",
fontSize:12
}
},
splitLine: {
show: true,
lineStyle: {color: "#767da180", type: "dashed"} //dashed
} //s线
},
series: [
{
name: "室内温度",
data: data.celueInfoList[i].tempInAry.listTempIn,
type: 'line',
smooth: true,
symbol: "none", //
itemStyle: { //线
color: '#F5901A',
}
}
]
};
option && indoorChart.setOption(option);
window.addEventListener("resize", function () {
indoorChart.resize();
});
}
};
</script>
<style scoped lang="scss">
@ -242,16 +365,10 @@ function getCelueListFun(){
overflow-y: auto;
}
.box-card {
width: 830px;
width: 100%;
color: #fff;
border: none;
margin-bottom: 20px;
&:nth-child(odd){
margin-right: 20px;
}
&:nth-child(even){
margin-right: 0px;
}
.card-header{
display: flex;
align-items: center;
@ -265,7 +382,20 @@ function getCelueListFun(){
font-size: 14px;
}
.item {
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
//margin-bottom: 18px;
.echartBox{
width: 60%;
height: 160px;
padding: 10px 0;
border: 1px solid #ffffff50;
.echart{
width: 100%;
height: 100%;
}
}
}
}
.echart{
@ -291,15 +421,18 @@ function getCelueListFun(){
::v-deep .el-input__inner{
color: #1fc7c7;
}
::v-deep .el-form{
width: 40%;
}
::v-deep .el-form .el-form-item__label{
color: #d3d3d3 !important;
}
::v-deep .el-form-item--default{
margin-bottom: 0px;
margin-right: 0px;
}
::v-deep .el-card{
background-color: #2F3D8A;
height: 260px;
}
@media (max-width:960px) {
.app-container{

@ -215,7 +215,7 @@ function tongbiChartFun(){
tongbiChart = echarts.init(chartDom);
const option = {
legend: {
data: [dateValue1.value,dateValue1.value - 1],
data: [dateValue1.value - 1, dateValue1.value],
// selectedMode: 'single',
textStyle: {
color: "#f3ffff"
@ -335,7 +335,7 @@ function tongbiChartFun(){
smooth: true,
symbol: "none", //
itemStyle: { //线
color: 'rgba(182,162,222)',
color: 'rgba(204,204,204)',
},
markPoint: {
data: [

@ -115,7 +115,7 @@
import * as echarts from 'echarts'
import {HomeFilled} from '@element-plus/icons-vue'
import Screenfull from '@/components/Screenfull'
import {ref, reactive, onMounted, onBeforeUnmount} from 'vue'
import {ref, onMounted, onBeforeUnmount} from 'vue'
import {getDevicesInfo,getZdb} from '../../api/bigview/bigview'
import {getWdcgq} from '../../api/emonitor/api'
@ -1127,19 +1127,25 @@ function outdoorChartFun(){
/** 页面销毁时*/
onBeforeUnmount(() => {
if(dcglChart) {
dcglChart.dispose(); // }
if (xrglChart) {
xrglChart.dispose();
}
if (kqyrbChart) {
kqyrbChart.dispose();
}
if (frdlChart) {
frdlChart.dispose();
}
if (dqglChart) {
dqglChart.dispose();
}
dcglChart.dispose(); //
}
if (xrglChart) {
xrglChart.dispose();
}
if (kqyrbChart) {
kqyrbChart.dispose();
}
if (frdlChart) {
frdlChart.dispose();
}
if (dqglChart) {
dqglChart.dispose();
}
if (indoorChart) {
indoorChart.dispose();
}
if (outdoorChart) {
outdoorChart.dispose();
}
});
</script>

@ -25,7 +25,7 @@
</span>
</el-form-item>
<el-form-item style="margin-left: 27px" v-for="inputs in item.control_elements" :label="inputs.nowTempRemark" v-if="data.show2">{{inputs.tempValue}}</el-form-item>
<el-form-item style="margin-left: 27px" v-for="inputs in item.control_elements" :label="inputs.nowTempRemark" v-if="data.show2">{{inputs.tempValue}}</el-form-item>
<!-- <el-form-item v-for="inputs in item.control_elements" :label="inputs.controlRemark"><input class="tempInput"/></el-form-item>-->
<el-button class="mybtn" type="primary" v-show="item.control_elements.length > 0 ? true : false" :disabled="item.deviceRunstatus == true ? false : true" @click="getSetTemperatureFun1()" v-if="data.show2">设定温度</el-button>
@ -138,7 +138,7 @@ onMounted(()=>{
})
function GetResult(){
ControlResult().then((res)=>{
console.log(res)
console.log('执行策略',res)
if(!res.data){
radio.value=''
data.strategyCode=''
@ -149,6 +149,7 @@ function GetResult(){
}
else if(res.data){
var a = res.data.strategyRunRes.substring(res.data.strategyRunRes.length-1)
console.log(a)
if(a==0){
radio.value=res.data.strategyName
data.strategyCode=res.data.strategyCode
@ -538,14 +539,14 @@ function controlMsg() {
if (i >= res.data.length) {
return; //
}
if(res.data[i]==1){
if(res.data[i]=='1'){
celueItem.scenesList[i].type = 'success';
celueItem.scenesList[i].icon = 'Check';
}
else if(res.data[i]==0){
else if(res.data[i]=='0'){
celueItem.scenesList[i].type = 'danger';
celueItem.scenesList[i].icon = 'Close';
}else if(res.data[i]==2){
}else if(res.data[i]=='2'){
celueItem.scenesList[i].type = 'warning';
celueItem.scenesList[i].icon = 'loading';
}
@ -672,7 +673,7 @@ function getSetTemperatureFun(item){
height: 170px;
.item_bottom_img{
width: 35%;
height: 95%;
height: 80%;
//border: 1px solid red;
padding: 10px;
margin-right: 10px;

Loading…
Cancel
Save