新增展馆展示

This commit is contained in:
lxz 2024-01-02 18:13:39 +08:00
parent 5bc6506e55
commit f5b4cdc073
4 changed files with 35 additions and 41 deletions

View File

@ -46,7 +46,7 @@ const setOnlineFn = (data) => {
title: [ title: [
{ {
text: (data.value / data.total * 100) + '%', text: (data.value / data.total * 100).toFixed(2) + '%',
x: 'center', x: 'center',
top: '42%', top: '42%',
textStyle: { textStyle: {

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="content" id="eq"> <div class="content" id="eq">
<div class="eq" v-for="item in productList" :key="item"> <div class="eq" v-for="item in productList" :key="item">
<img :src="item.image" style="width:8vw;height: 100%;border-radius: 1vh;" alt=""> <img :src="item.image" style="height: 100%;border-radius: 1vh;" alt="">
<div <div
style="display: flex;flex-direction: column;justify-content: space-between;margin-left: 1vw;color: #CAD5E5;"> style="display: flex;flex-direction: column;justify-content: space-between;margin-left: 1vw;color: #CAD5E5;">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">

View File

@ -4,21 +4,21 @@
<div class="l"> <div class="l">
<div style="position: relative;padding-top: 5px;"> <div style="position: relative;padding-top: 5px;">
<div style="position: absolute;top: 0;"> <div style="position: absolute;top: 0;font-size: 10px;">
土壤温度已预警 <span style="color: #B7555A;">{{ data.soil_temperature?.alarmCount }}</span> 土壤温度已预警 <span style="color: #B7555A;">{{ data.soil_temperature?.alarmCount }}</span>
</div> </div>
<div class="t" style="width: 15vw;" id="l_t"></div> <div class="t" style="width: 15vw;" id="l_t"></div>
</div> </div>
<div style="position: relative;padding-top: 5px;"> <div style="position: relative;padding-top: 5px;">
<div style="position: absolute;top: 0;"> <div style="position: absolute;top: 0;font-size: 10px;">
土壤湿度已预警 <span style="color: #B7555A;">{{ data.soil_moisture?.alarmCount }}</span> 土壤湿度已预警 <span style="color: #B7555A;">{{ data.soil_moisture?.alarmCount }}</span>
</div> </div>
<div class="t" id="l_c"></div> <div class="t" id="l_c"></div>
</div> </div>
<div style="position: relative;padding-top: 5px;"> <div style="position: relative;padding-top: 5px;">
<div style="position: absolute;top: 0;"> <div style="position: absolute;top: 0;font-size: 10px;">
土壤PH值 已预警 <span style="color: #B7555A;">{{ data.soil_PH?.alarmCount }}</span> 土壤PH值 已预警 <span style="color: #B7555A;">{{ data.soil_PH?.alarmCount }}</span>
</div> </div>
<div class="t" id="l_b"></div> <div class="t" id="l_b"></div>
@ -27,15 +27,16 @@
<div class="c"> <div class="c">
<div> <div>
<div style="position: absolute;top: 0;"> <div style="position: absolute;top: 0;font-size: 10px;margin-bottom: 2px;">
土壤氮磷钾 已预警 <span style="color: #B7555A;">{{data.soil_potassium_phosphate_nitrogen?.alarmCount }}</span> 土壤氮磷钾 已预警 <span style="color: #B7555A;">{{ data.soil_potassium_phosphate_nitrogen?.alarmCount }}</span>
</div> </div>
<div class="c-t" id="c_t"></div> <div class="c-t" id="c_t"></div>
</div> </div>
<div class="c-b"> <div class="c-b">
<div style="position: absolute;top: 0;left: 5vw;"> <div style="position: absolute;top: 0;left: 5vw;font-size: 10px;">
风速m/s 已预警 <span style="color: #B7555A;">{{ data.wind_speed?.alarmCount }}</span> 风速m/s 已预警 <span style="color: #B7555A;">{{ data.wind_speed?.alarmCount }}</span>
</div> </div>
<div id="c_b" style="width: 100%;height: 100%;"></div> <div id="c_b" style="width: 100%;height: 100%;"></div>
@ -43,14 +44,14 @@
</div> </div>
<div class="l"> <div class="l">
<div style="position: relative;padding-top: 5px;"> <div style="position: relative;padding-top: 5px;">
<div style="position: absolute;top: 0;"> <div style="position: absolute;top: 0;font-size: 10px;">
环境温度已预警 <span style="color: #B7555A;">{{ data.ambient_temperature?.alarmCount }}</span> 环境温度已预警 <span style="color: #B7555A;">{{ data.ambient_temperature?.alarmCount }}</span>
</div> </div>
<div class="t" style="width: 14vw;" id="r_t"></div> <div class="t" style="width: 14vw;" id="r_t"></div>
</div> </div>
<div style="position: relative;padding-top: 5px;"> <div style="position: relative;padding-top: 5px;">
<div style="position: absolute;top: 0;"> <div style="position: absolute;top: 0;font-size: 10px;">
环境湿度已预警 <span style="color: #B7555A;">{{ data.ambient_humidity?.alarmCount }}</span> 环境湿度已预警 <span style="color: #B7555A;">{{ data.ambient_humidity?.alarmCount }}</span>
</div> </div>
<div class="t" id="r_c"></div> <div class="t" id="r_c"></div>
@ -58,7 +59,7 @@
<!-- <div class="l-c"></div> --> <!-- <div class="l-c"></div> -->
<div style="position: relative;padding-top: 5px;"> <div style="position: relative;padding-top: 5px;">
<div style="position: absolute;top: 0;"> <div style="position: absolute;top: 0;font-size: 10px;">
二氧化碳 已预警 <span style="color: #B7555A;">{{ data.carbon_dioxide?.alarmCount }}</span> 二氧化碳 已预警 <span style="color: #B7555A;">{{ data.carbon_dioxide?.alarmCount }}</span>
</div> </div>
<div class="t" id="r_b"></div> <div class="t" id="r_b"></div>
@ -164,7 +165,7 @@ const initCharts = (tag, option) => {
const setoptionsFn = (X, Y) => { const setoptionsFn = (X, Y, tits) => {
let data = { let data = {
color: ["#ffc20e", "#00ae9d"], color: ["#ffc20e", "#00ae9d"],
@ -179,6 +180,7 @@ const setoptionsFn = (X, Y) => {
trigger: "axis", trigger: "axis",
backgroundColor: "rgba(61, 85, 102, 0.2)", backgroundColor: "rgba(61, 85, 102, 0.2)",
borderWidth: 1, borderWidth: 1,
confine:true,
borderColor: "#9DBAE1", // borderColor: "#9DBAE1", //
// 线 // 线
axisPointer: { axisPointer: {
@ -189,16 +191,7 @@ const setoptionsFn = (X, Y) => {
// //
textStyle: { textStyle: {
color: "#fff", color: "#fff",
fontSize: 10 fontSize: 8
}
},
legend: {
right: "3%",
icon: "circle",
itemWidth: 8,
itemGap: 20,
textStyle: {
padding: [0, 0, 0, 5]
} }
}, },
xAxis: [ xAxis: [
@ -238,7 +231,7 @@ const setoptionsFn = (X, Y) => {
], ],
series: [ series: [
{ {
name: "", name: tits,
type: "line", type: "line",
smooth: true, // 线 smooth: true, // 线
// symbol:'circle', // // symbol:'circle', //
@ -285,6 +278,7 @@ const CKP = {
trigger: "axis", trigger: "axis",
backgroundColor: "rgba(61, 85, 102, 0.2)", backgroundColor: "rgba(61, 85, 102, 0.2)",
borderWidth: 1, borderWidth: 1,
confine:true,
borderColor: "#9DBAE1", // borderColor: "#9DBAE1", //
// 线 // 线
axisPointer: { axisPointer: {
@ -442,8 +436,8 @@ landMonitorAlarmHistoryApi({
data[key] = res.data.list[key] data[key] = res.data.list[key]
} }
initCharts('l_t', setoptionsFn(res.data.list.soil_temperature.historyList[0].time, res.data.list.soil_temperature.historyList[1].value)) initCharts('l_t', setoptionsFn(res.data.list.soil_temperature.historyList[0].time, res.data.list.soil_temperature.historyList[1].value),'土壤温度')
initCharts('l_c', setoptionsFn(res.data.list.soil_moisture.historyList[0].time, res.data.list.soil_moisture.historyList[1].value)) initCharts('l_c', setoptionsFn(res.data.list.soil_moisture.historyList[0].time, res.data.list.soil_moisture.historyList[1].value),'土壤湿度')
initCharts('l_b', setoptionsFn(res.data.list.soil_PH.historyList[0].time, res.data.list.soil_PH.historyList[1].value)) initCharts('l_b', setoptionsFn(res.data.list.soil_PH.historyList[0].time, res.data.list.soil_PH.historyList[1].value))
initCharts('c_b', setoptionsFn(res.data.list.wind_speed.historyList[0].time, res.data.list.wind_speed.historyList[1].value)) initCharts('c_b', setoptionsFn(res.data.list.wind_speed.historyList[0].time, res.data.list.wind_speed.historyList[1].value))
initCharts('r_t', setoptionsFn(res.data.list.ambient_temperature.historyList[0].time, res.data.list.ambient_temperature.historyList[1].value)) initCharts('r_t', setoptionsFn(res.data.list.ambient_temperature.historyList[0].time, res.data.list.ambient_temperature.historyList[1].value))