Merge remote-tracking branch 'origin/master'

master
魔神煜修罗皇 2 years ago
commit ad0d7ac973
  1. BIN
      psdc-ui/src/assets/images/风机盘管(1).png
  2. 4
      psdc-ui/src/permission.js
  3. 517
      psdc-ui/src/views/bigview/index.vue
  4. 28
      psdc-ui/src/views/control/manual/index.vue
  5. 40
      psdc-ui/src/views/emonitor/wdcgq/index.vue
  6. 12
      psdc-ui/src/views/system/cl/index.vue

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 35 KiB

@ -18,8 +18,8 @@ router.beforeEach((to, from, next) => {
if (getToken()) {
to.meta.title && useSettingsStore().setTitle(to.meta.title)
/* has token*/
if (to.path === '/login') {
next({ path: '/' })
if (to.path === '/'|| to.path==='/login') {
next({ path: 'bigview' })
NProgress.done()
} else {
if (useUserStore().roles.length === 0) {

@ -9,7 +9,7 @@
<div class="main">
<div class="left">
<div class="left_top bgimg">
<div class="title">电磁锅</div>
<div class="title">变频电磁采暖</div>
<div class="info_box">
<div class="dev_img">
<img src="../../assets/images/dcgl.png" alt="">
@ -18,7 +18,7 @@
<p>当前状态<span :class="{'green':dcglRunStatus === '开启','red':dcglRunStatus === '关闭'}">{{ dcglRunStatus }}</span></p>
<p>进水温度<span class="enter_t"><span>{{ dcglThermometerValueIn }}</span></span></p>
<p>出水温度<span class="leave_t"><span>{{ dcglThermometerValueOut }}</span></span></p>
<p>今日能耗<span class="today_tce"><span>{{ dcglTodayUseEnergy }}</span>kWh</span></p>
<!-- <p>今日能耗<span class="today_tce"><span>{{ dcglTodayUseEnergy }}</span>kWh</span></p>-->
</div>
</div>
<div class="chart_box">
@ -26,7 +26,7 @@
</div>
</div>
<div class="left_bottom bgimg">
<div class="title">蓄热锅炉</div>
<div class="title">蓄热水箱</div>
<div class="info_box">
<div class="dev_img">
<img src="../../assets/images/蓄热锅炉.png" alt="">
@ -35,7 +35,7 @@
<p>当前状态<span :class="{'green':xrglRunStatus === '开启','red':xrglRunStatus === '关闭'}">{{ xrglRunStatus }}</span></p>
<p>进水温度<span class="enter_t"><span>{{ xrglThermometerValueIn }}</span></span></p>
<p>出水温度<span class="leave_t"><span>{{ xrglThermometerValueOut }}</span></span></p>
<p>今日能耗<span class="today_tce"><span>{{ xrglTodayUseEnergy }}</span>kWh</span></p>
<!-- <p>今日能耗<span class="today_tce"><span>{{ xrglTodayUseEnergy }}</span>kWh</span></p>-->
</div>
</div>
<div class="chart_box">
@ -61,16 +61,15 @@
</div>
<div class="middle_bottom">
<div class="chart_box2 bgimg">
<div class="title">当前功率</div>
<div class="title">电表总功率</div>
<div class="nowPower_chart" id="dqglChart"></div>
</div>
<div class="wendu_box">
<div class="item" v-for="item in wdcgqArr" :key="item.deviceId">
<div class="dev_name">{{ item.deviceName }}</div>
<div class="line"></div>
<div class="data"><span class="screenNumber">{{ item.thermometerValue}}</span></div>
</div>
<div class="indoor bgimg" id="indoorChart"></div>
<div class="outdoor bgimg" id="outdoorChart"></div>
</div>
</div>
</div>
<div class="right">
@ -84,7 +83,7 @@
<p>当前状态<span :class="{'green':kqyrbRunStatus === '开启','red':kqyrbRunStatus === '关闭'}">{{ kqyrbRunStatus }}</span></p>
<p>进水温度<span class="enter_t"><span>{{ kqyrbThermometerValueIn }}</span></span></p>
<p>出水温度<span class="leave_t"><span>{{ kqyrbThermometerValueOut }}</span></span></p>
<p>今日能耗<span class="today_tce"><span>{{ kqyrbTodayUseEnergy }}</span>kWh</span></p>
<!-- <p>今日能耗<span class="today_tce"><span>{{ kqyrbTodayUseEnergy }}</span>kWh</span></p>-->
</div>
</div>
<div class="chart_box">
@ -99,12 +98,12 @@
</div>
<div class="dev_data">
<p>当前状态<span :class="{'green':frdlRunStatus === '开启','red':frdlRunStatus === '关闭'}">{{ frdlRunStatus }}</span></p>
<p>当前温度<span class="now_t"><span>{{ frdlThermometerValueNow }}</span></span></p>
<p>今日能耗<span class="today_tce"><span>{{ frdlTodayUseEnergy }}</span>kWh</span></p>
<!-- <p>当前温度<span class="now_t"><span>{{ frdlThermometerValueNow }}</span></span></p>-->
<!-- <p>今日能耗<span class="today_tce"><span>{{ frdlTodayUseEnergy }}</span>kWh</span></p>-->
</div>
</div>
<div class="chart_box">
<div class="dev_chart" id="frdlChart"></div>
<!-- <div class="dev_chart" id="frdlChart"></div>-->
</div>
</div>
</div>
@ -117,7 +116,8 @@ 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 {getTemperature,getDevicesInfo,getZdb} from '../../api/bigview/bigview'
import {getDevicesInfo,getZdb} from '../../api/bigview/bigview'
import {getWdcgq} from '../../api/emonitor/api'
//
function linkPage(){
@ -144,12 +144,14 @@ onMounted(()=>{
}, 1000);
dcglChartFun();
kqyrbChartFun();
frdlChartFun();
getWenduFun();
// frdlChartFun();
getDevicesInfoFun();
xrglChartFun();
getZdbFun();
dqglChartFun()
dqglChartFun();
getWdcgqFun();
indoorChartFun();
outdoorChartFun()
})
function refresh(){
// window.location.reload();
@ -193,20 +195,6 @@ function fontSize(px) { //传入字体大小
return px * fontSize; // rem
}
/** 8个温度传感器数据*/
const wdcgqArr = ref([])
function getWenduFun(){
getTemperature("温度传感器").then((res)=>{
console.log('8个温度传感器',res)
for(let i = 0;i < res.data.length;i++){
if(res.data[i].deviceTemp == null){
res.data[i].deviceTemp = '--'
}
}
wdcgqArr.value = res.data
})
}
/**运行设备工作信息*/
//
const xrglRunStatus = ref('--')
@ -305,7 +293,7 @@ function getDevicesInfoFun(){
frdlTodayUseEnergy.value = res.data[i].todayUseEnergy;
frdlTimeList.value = res.data[i].timeList;
frdlTempTodayList.value = res.data[i].tempTodayList;
frdlChartFun();
// frdlChartFun();
}
}
})
@ -314,7 +302,7 @@ function getDevicesInfoFun(){
let dcglChart;
let xrglChart;
let kqyrbChart;
let frdlChart;
// let frdlChart;
function dcglChartFun(){
var chartDom = document.getElementById('dcglChart')
dcglChart = echarts.init(chartDom);
@ -660,12 +648,137 @@ function kqyrbChartFun(){
kqyrbChart.resize();
});
};
function frdlChartFun(){
const chartDom = document.getElementById('frdlChart')
frdlChart = echarts.init(chartDom);
// function frdlChartFun(){
// const chartDom = document.getElementById('frdlChart')
// frdlChart = echarts.init(chartDom);
// const option = {
// legend: {
// data: [""],
// // selectedMode: 'single',
// textStyle: {
// color: "#b6bee7",
// fontSize: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>'+value+'</strong>' + '<br>'; //
// if (i === 0) { //
// result += '<span>' + '<span style="color: #128dff">'+seriesName+'</span>' + '&nbsp;&nbsp;&nbsp;&nbsp;' + '<strong>'+value+'</strong>' + '</span><br>';
// } else if (i === 1) { //
// result += '<span>' + '<span style="color: #F5901A">'+seriesName+'</span>' + '&nbsp;&nbsp;&nbsp;&nbsp;' + '<strong>'+value+'</strong>' + '</span><br>';
// } else { // 使
// result += seriesName + ': ' + value + ' m/s<br>';
// }
// }
// return result;
// },
// // borderColor: '#00fcff',
// borderWidth: 1
// },
// grid:{
// show: true,
// top: '20%',
// bottom:'15%',
// left:'10%',
// right:'3%',
// borderWidth: 0,
// borderColor: '#767da1',
// },
// xAxis: {
// type: 'category',
// data: frdlTimeList.value,
// axisLabel: {
// textStyle: {
// color: "#b6bee7",
// fontSize:fontSize(12)
// }
// },
// axisLine: {
// lineStyle: {
// color: '#767da1' // 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:fontSize(12),
// nameLocation: "start"
// },
// axisLabel: {
// textStyle: {
// color: "#b6bee7",
// fontSize:fontSize(12)
// }
// },
// splitLine: {
// show: true,
// lineStyle: {color: "#767da1", type: "dashed"} //dashed
// } //s线
// },
// series: [
// {
// name: "",
// data: frdlTempTodayList.value,
// type: 'line',
// smooth: true,
// symbol: "none", //
// itemStyle: { //线
// color: '#128dff',
// }
// }
// ]
// };
// option && frdlChart.setOption(option);
// window.addEventListener("resize", function () {
// frdlChart.resize();
// });
// };
/**总电表信息*/
const nowPower = ref('--')
const nowEle = ref('--')
const todayUsePowersArr = [];
function getZdbFun(){
getZdb(13).then((res)=>{
console.log(res.data)
nowPower.value = res.data.totp;
nowEle.value = res.data.totwh;
delete res.data.todayUsePowers.userId
delete res.data.todayUsePowers.deviceId
delete res.data.todayUsePowers.samDate
for(let i in res.data.todayUsePowers){
todayUsePowersArr.push(res.data.todayUsePowers[i])
}
dqglChartFun()
})
}
let dqglChart;
function dqglChartFun(){
const chartDom = document.getElementById('dqglChart')
dqglChart = echarts.init(chartDom);
const option = {
legend: {
data: ["当前温度"],
data: ["总功率"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7",
@ -674,19 +787,13 @@ function frdlChartFun(){
},
tooltip: {
trigger: "axis",
// formatter: "{b0} {c0}kW",
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>'+value+'</strong>' + '<br>'; //
if (i === 0) { //
result += '<span>' + '<span style="color: #128dff">'+seriesName+'</span>' + '&nbsp;&nbsp;&nbsp;&nbsp;' + '<strong>'+value+'</strong>' + '</span>℃<br>';
} else if (i === 1) { //
result += '<span>' + '<span style="color: #F5901A">'+seriesName+'</span>' + '&nbsp;&nbsp;&nbsp;&nbsp;' + '<strong>'+value+'</strong>' + '</span>℃<br>';
} else { // 使
result += seriesName + ': ' + value + ' m/s<br>';
}
result += '<span>' + '<span style="color: #128dff">'+seriesName+'</span>' + '&nbsp;&nbsp;&nbsp;&nbsp;' + '<strong>'+value+'</strong>' + '</span>kW<br>';
}
return result;
},
@ -704,7 +811,31 @@ function frdlChartFun(){
},
xAxis: {
type: 'category',
data: frdlTimeList.value,
data: ["00:00",
"00:15", "00:30", "00:45", "01:00",
"01:15", "01:30", "01:45", "02:00",
"02:15", "02:30", "02:45", "03:00",
"03:15", "03:30", "03:45", "04:00",
"04:15", "04:30", "04:45", "05:00",
"05:15", "05:30", "05:45", "06:00",
"06:15", "06:30", "06:45", "07:00",
"07:15", "07:30", "07:45", "08:00",
"08:15", "08:30", "08:45", "09:00",
"09:15", "09:30", "09:45", "10:00",
"10:15", "10:30", "10:45", "11:00",
"11:15", "11:30", "11:45", "12:00",
"12:15", "12:30", "12:45", "13:00",
"13:15", "13:30", "13:45", "14:00",
"14:15", "14:30", "14:45", "15:00",
"15:15", "15:30", "15:45", "16:00",
"16:15", "16:30", "16:45", "17:00",
"17:15", "17:30", "17:45", "18:00",
"18:15", "18:30", "18:45", "19:00",
"19:15", "19:30", "19:45", "20:00",
"20:15", "20:30", "20:45", "21:00",
"21:15", "21:30", "21:45", "22:00",
"22:15", "22:30", "22:45", "23:00",
"23:15", "23:30", "23:45",],
axisLabel: {
textStyle: {
color: "#b6bee7",
@ -730,7 +861,7 @@ function frdlChartFun(){
},
yAxis: {
type: 'value',
name:'',
name:'kW',
nameTextStyle: {
color: "#b6bee7",
fontSize:fontSize(12),
@ -745,67 +876,74 @@ function frdlChartFun(){
splitLine: {
show: true,
lineStyle: {color: "#767da1", type: "dashed"} //dashed
} //s线
} //线
},
series: [
{
name: "当前温度",
data: frdlTempTodayList.value,
name: "总功率",
data: todayUsePowersArr,
type: 'line',
smooth: true,
symbol: "none", //
itemStyle: { //线
color: '#128dff',
}
},
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: "#128dff"},
{offset: 0.5, color: "rgba(18,141,252,.2)"},
{offset: 1, color: "rgba(18,141,252,.0)"}
])
}
}, //线
}
]
};
option && frdlChart.setOption(option);
option && dqglChart.setOption(option);
window.addEventListener("resize", function () {
frdlChart.resize();
dqglChart.resize();
});
};
/**总电表信息*/
const nowPower = ref('--')
const nowEle = ref('--')
const todayUsePowersArr = [];
function getZdbFun(){
getZdb(13).then((res)=>{
console.log(res.data)
nowPower.value = res.data.totp;
nowEle.value = res.data.totwh;
delete res.data.todayUsePowers.userId
delete res.data.todayUsePowers.deviceId
delete res.data.todayUsePowers.samDate
for(let i in res.data.todayUsePowers){
todayUsePowersArr.push(res.data.todayUsePowers[i])
/**室内外温度曲线*/
const timesLine = ref('')
const indoorLine = ref('')
const outdoorLine = ref('')
function getWdcgqFun(){
getWdcgq("温度传感器").then((res)=>{
console.log('室内外温度曲线数据',res)
for(let i = 0; i < res.data.length;i++){
timesLine.value = res.data[i].times
indoorLine.value = res.data[i].listTempIn
outdoorLine.value = res.data[i].listTempOut
}
dqglChartFun()
indoorChartFun();
outdoorChartFun()
})
}
let dqglChart;
function dqglChartFun(){
const chartDom = document.getElementById('dqglChart')
dqglChart = echarts.init(chartDom);
//
let indoorChart;
function indoorChartFun(){
const chartDom = document.getElementById('indoorChart')
indoorChart = echarts.init(chartDom);
const option = {
legend: {
data: ["当前功率"],
data: ["室内温度"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7",
fontSize:fontSize(14)
fontSize:fontSize(12)
}
},
tooltip: {
trigger: "axis",
// formatter: "{b0} {c0}kW",
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 += '<span>' + '<span style="color: #128dff">'+seriesName+'</span>' + '&nbsp;&nbsp;&nbsp;&nbsp;' + '<strong>'+value+'</strong>' + '</span>kW<br>';
result += seriesName + ': ' + '<strong style="color: #F5901A">'+value+'</strong>' + '℃<br>'; //
}
return result;
},
@ -816,47 +954,23 @@ function dqglChartFun(){
show: true,
top: '20%',
bottom:'15%',
left:'10%',
right:'3%',
left:'8%',
right:'4%',
borderWidth: 0,
borderColor: '#767da1',
},
xAxis: {
type: 'category',
data: ["00:00",
"00:15", "00:30", "00:45", "01:00",
"01:15", "01:30", "01:45", "02:00",
"02:15", "02:30", "02:45", "03:00",
"03:15", "03:30", "03:45", "04:00",
"04:15", "04:30", "04:45", "05:00",
"05:15", "05:30", "05:45", "06:00",
"06:15", "06:30", "06:45", "07:00",
"07:15", "07:30", "07:45", "08:00",
"08:15", "08:30", "08:45", "09:00",
"09:15", "09:30", "09:45", "10:00",
"10:15", "10:30", "10:45", "11:00",
"11:15", "11:30", "11:45", "12:00",
"12:15", "12:30", "12:45", "13:00",
"13:15", "13:30", "13:45", "14:00",
"14:15", "14:30", "14:45", "15:00",
"15:15", "15:30", "15:45", "16:00",
"16:15", "16:30", "16:45", "17:00",
"17:15", "17:30", "17:45", "18:00",
"18:15", "18:30", "18:45", "19:00",
"19:15", "19:30", "19:45", "20:00",
"20:15", "20:30", "20:45", "21:00",
"21:15", "21:30", "21:45", "22:00",
"22:15", "22:30", "22:45", "23:00",
"23:15", "23:30", "23:45",],
data: timesLine.value,
axisLabel: {
textStyle: {
color: "#b6bee7",
fontSize:fontSize(12)
fontSize:fontSize(10)
}
},
axisLine: {
lineStyle: {
color: '#767da1' // x线
color: '#767da180' // x线
}
},
axisTick: {
@ -873,54 +987,143 @@ function dqglChartFun(){
},
yAxis: {
type: 'value',
name:'kW',
// name:'',
nameTextStyle: {
color: "#b6bee7",
fontSize:fontSize(12),
fontSize:fontSize(10),
nameLocation: "start"
},
axisLabel: {
textStyle: {
color: "#b6bee7",
fontSize:fontSize(12)
fontSize:fontSize(10)
}
},
splitLine: {
show: true,
lineStyle: {color: "#767da1", type: "dashed"} //dashed
} //线
lineStyle: {color: "#767da180", type: "dashed"} //dashed
} //s线
},
series: [
{
name: "当前功率",
data: todayUsePowersArr,
name: "室内温度",
data: indoorLine.value,
type: 'line',
smooth: true,
symbol: "none", //
itemStyle: { //线
color: '#128dff',
},
color: '#F5901A',
}
}
]
};
option && indoorChart.setOption(option);
window.addEventListener("resize", function () {
indoorChart.resize();
});
};
//
let outdoorChart;
function outdoorChartFun(){
const chartDom = document.getElementById('outdoorChart')
outdoorChart = echarts.init(chartDom);
const option = {
legend: {
data: ["室外温度"],
// selectedMode: 'single',
textStyle: {
color: "#b6bee7",
fontSize:fontSize(12)
}
},
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:'15%',
left:'8%',
right:'4%',
borderWidth: 0,
borderColor: '#767da1',
},
xAxis: {
type: 'category',
data: timesLine.value,
axisLabel: {
textStyle: {
color: "#b6bee7",
fontSize:fontSize(10)
}
},
axisLine: {
lineStyle: {
color: '#767da180' // x线
}
},
axisTick: {
show: true // x
},
splitArea: {
show: false,
interval:0,
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: "#128dff"},
{offset: 0.5, color: "rgba(18,141,252,.2)"},
{offset: 1, color: "rgba(18,141,252,.0)"}
])
}
}, //线
color: ['rgb(54,68,148,.8)', 'rgb(37,51,133,.8)'] //
//
}
}
},
yAxis: {
type: 'value',
// name:'',
nameTextStyle: {
color: "#b6bee7",
fontSize:fontSize(10),
nameLocation: "start"
},
axisLabel: {
textStyle: {
color: "#b6bee7",
fontSize:fontSize(10)
}
},
splitLine: {
show: true,
lineStyle: {color: "#767da180", type: "dashed"} //dashed
} //s线
},
series: [
{
name: "室外温度",
data: outdoorLine.value,
type: 'line',
smooth: true,
symbol: "none", //
itemStyle: { //线
color: '#F5901A',
}
}
]
};
option && dqglChart.setOption(option);
option && outdoorChart.setOption(option);
window.addEventListener("resize", function () {
dqglChart.resize();
outdoorChart.resize();
});
};
/** 页面销毁时*/
onBeforeUnmount(() => {
if(dcglChart) {
@ -1117,34 +1320,40 @@ onBeforeUnmount(() => {
flex-wrap: wrap;
width: 49%;
height: 100%;
.item{
width: 24%;
height: 48.5%;
padding: 0 .1rem;
border: 1px solid #1085B6;
&:first-child{
margin-bottom: 0.08rem;
}
.dev_name{
color: #19C3F4;
font-size: .14rem;
text-align: center;
line-height: .4rem;
}
.line{
width: 100%;
height: 1px;
background-image: url("../../assets/images/line.png");
background-size: 100% 100%;
}
.data{
color: #F5901A;
font-size: .26rem;
font-weight: bold;
line-height: .8rem;
text-align: center;
}
div{
width: 100%;
height: 50%;
padding: 10px 0;
//border: 1px solid red;
}
//.item{
// width: 24%;
// height: 48.5%;
// padding: 0 .1rem;
// border: 1px solid #1085B6;
// &:first-child{
// margin-bottom: 0.08rem;
// }
// .dev_name{
// color: #19C3F4;
// font-size: .14rem;
// text-align: center;
// line-height: .4rem;
// }
// .line{
// width: 100%;
// height: 1px;
// background-image: url("../../assets/images/line.png");
// background-size: 100% 100%;
// }
// .data{
// color: #F5901A;
// font-size: .26rem;
// font-weight: bold;
// line-height: .8rem;
// text-align: center;
// }
//}
}
}
}

@ -25,10 +25,15 @@
</span>
</el-form-item>
<el-form-item v-for="inputs in item.control_elements" :label="inputs.controlRemark"><input :disabled="item.deviceRunstatus == true ? false : true" class="tempInput" v-model="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-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>
<el-button class="mybtn" type="primary" v-show="item.control_elements.length > 0 ? true : false" :disabled="item.deviceRunstatus == true ? false : true" @click="getSetTemperatureFun(item)">确定</el-button>
<el-form-item v-for="inputs in item.control_elements" :label="inputs.controlRemark" v-if="data.show1"><input :disabled="item.deviceRunstatus == true ? false : true" class="tempInput" v-model="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" v-show="item.control_elements.length > 0 ? true : false" :disabled="item.deviceRunstatus == true ? false : true" @click="getSetTemperatureFun2()" v-if="data.show1">取消</el-button>
<el-button class="mybtn1" type="primary" v-show="item.control_elements.length > 0 ? true : false" :disabled="item.deviceRunstatus == true ? false : true" @click="getSetTemperatureFun(item)" v-if="data.show1">确定</el-button>
</el-form>
</div>
@ -118,6 +123,8 @@ import { ref,reactive,onMounted } from 'vue'
import { ElMessageBox,ElMessage, ElLoading} from 'element-plus'
import { getDevice,getControlLogList,getStrategyList,getStartAndStop,getSetTemperature,getSenceControl,getControlDeviceList,ControlInfo ,ControlResult} from '@/api/control/manual'
const data = reactive({
show1:false,
show2:true,
strategyCode:'',
info:'',
result:'',
@ -585,8 +592,18 @@ function handleDevChangeFun(id,sta){
// })
// }
function getSetTemperatureFun1(){
data.show2=false
data.show1=true
}
function getSetTemperatureFun2(){
data.show2=true
data.show1=false
}
/** 设置温度*/
function getSetTemperatureFun(item){
data.show2=true
data.show1=false
let dataArr = [];
for(let i = 0;i < item.control_elements.length;i++){
let dataObject = {
@ -758,6 +775,11 @@ function getSetTemperatureFun(item){
float: right;
margin-top: 5px;
}
.mybtn1{
float: right;
margin-top: 5px;
margin-right: 5px;
}
::v-deep .el-form-item--default .el-form-item__label{
height: 32px;
line-height: 32px;

@ -1,11 +1,18 @@
<template>
<div class="app-container home">
<div class="top">
<div class="card" v-for="item in data.wdcgqList ">
<!-- <div class="card" v-for="item in data.wdcgqList ">-->
<!-- <div><img src="../../../assets/images/温度.png"></div>-->
<!-- <div>-->
<!-- <p style="color: #cccccc">{{item.name}}</p>-->
<!-- <h1>{{item.temp}}</h1>-->
<!-- </div>-->
<!-- </div>-->
<div class="card" v-for="item in wdcgqArr" :key="item.deviceId">
<div><img src="../../../assets/images/温度.png"></div>
<div>
<p style="color: #cccccc">{{item.name}}</p>
<h1>{{item.temp}}</h1>
<p style="color: #cccccc">{{item.deviceName}}</p>
<h1>{{item.thermometerValue}}</h1>
</div>
</div>
</div>
@ -23,8 +30,9 @@
<script name="Index">
import {getWdcgq} from '../../../api/emonitor/api'
import {onMounted, reactive} from "vue";
import {onMounted, reactive, ref} from "vue";
import * as echarts from 'echarts';
import {getTemperature} from "@/api/bigview/bigview";
export default {
name: "wdcgq",
setup() {
@ -301,9 +309,29 @@ export default {
};
})
getWenduFun()
});
/** 8个温度传感器数据*/
const wdcgqArr = ref([])
function getWenduFun(){
getTemperature("温度传感器").then((res)=>{
console.log('8个温度传感器',res)
for(let i = 0;i < res.data.length;i++){
if(res.data[i].deviceTemp == null){
res.data[i].deviceTemp = '--'
}
}
wdcgqArr.value = res.data
})
}
return{
data
data,wdcgqArr
}
},
components: {},
@ -324,7 +352,7 @@ p{
justify-content: flex-start;
}
.card{
width: 19.45%;
width: 24%;
height: 110px;
background-color: #2F3D8A;
margin-bottom: 12px;

@ -85,13 +85,13 @@
<el-select v-model="item.judgeDevice" placeholder="请选择" style="width: 240px">
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
</el-select>
<span style="width: .7rem;display: inline-block ;margin: 20px">限制属性</span>
<span style="width: 4.7rem;display: inline-block ;margin: 20px">限制属性</span>
<el-radio-group v-model="item.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: .7rem;display: inline-block ;margin-left: 50px">限制值</span>
<span style="width: 4.7rem;display: inline-block ;margin-left: 50px">限制值</span>
<el-input type="number" v-model="item.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>
@ -105,7 +105,7 @@
<template v-if="control.label === '控制启停'">
<el-radio-group v-model="control.value">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
<el-radio label="0">关闭</el-radio>
</el-radio-group>
</template>
<template v-else>
@ -164,13 +164,13 @@
<el-select v-model="item.judgeDevice" placeholder="请选择" style="width: 240px">
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
</el-select>
<span style="width: .7rem;display: inline-block ;margin: 20px">限制属性</span>
<span style="width: 4.7rem;display: inline-block ;margin: 20px">限制属性</span>
<el-radio-group v-model="item.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: .7rem;display: inline-block ;margin-left: 50px">限制值</span>
<span style="width: 4.7rem;display: inline-block ;margin-left: 50px">限制值</span>
<el-input type="number" v-model="item.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>
@ -184,7 +184,7 @@
<template v-if="control.label === '控制启停'">
<el-radio-group v-model="control.value">
<el-radio label="1">开启</el-radio>
<el-radio label="2">关闭</el-radio>
<el-radio label="0">关闭</el-radio>
</el-radio-group>
</template>
<template v-else>

Loading…
Cancel
Save