fix:排放图标点击事件
This commit is contained in:
parent
d120b827ae
commit
6e932ef1e9
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -157,14 +157,64 @@
|
||||||
>
|
>
|
||||||
<span class="titleIcon"></span>实时监测
|
<span class="titleIcon"></span>实时监测
|
||||||
</p>
|
</p>
|
||||||
<p class="bodyTitle" v-else-if="objItem.cate_code != 'monitor'">
|
<p class="bodyTitle" v-else-if="objItem.type != 'monitor'">
|
||||||
<span class="titleIcon"></span>实时状态
|
<span class="titleIcon"></span>实时状态
|
||||||
</p>
|
</p>
|
||||||
<div class="bodyContainer">
|
<div class="bodyContainer">
|
||||||
<div
|
<div v-if="objItem.cate_code == 'cems'">
|
||||||
class="rdio-group"
|
<div class="infoTableTr">
|
||||||
v-if="objItem.type == 10 || objItem.type == 30"
|
<div class="infoTableHeadTh">颗粒物</div>
|
||||||
>
|
<div class="infoTableHeadTh">SO₂</div>
|
||||||
|
<div class="infoTableHeadTh">NOx</div>
|
||||||
|
</div>
|
||||||
|
<div class="infoTableTr">
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.颗粒物折算值 }}mg/m³
|
||||||
|
</div>
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.so2折算值 }}mg/m³
|
||||||
|
</div>
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.nox折算值 }}mg/m³
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="infoTableTr">
|
||||||
|
<div class="infoTableHeadTh">流量</div>
|
||||||
|
<div class="infoTableHeadTh">温度</div>
|
||||||
|
<div class="infoTableHeadTh">湿度</div>
|
||||||
|
</div>
|
||||||
|
<div class="infoTableTr">
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.流量 }}m³/h
|
||||||
|
</div>
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.温度 }}℃
|
||||||
|
</div>
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.湿度 }}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="objItem.cate_code == 'tsp'">
|
||||||
|
<div class="infoTableTr">
|
||||||
|
<div class="infoTableHeadTh">TSP</div>
|
||||||
|
<div class="infoTableHeadTh">温度</div>
|
||||||
|
<div class="infoTableHeadTh">湿度</div>
|
||||||
|
</div>
|
||||||
|
<div class="infoTableTr">
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.tsp }}mg/m³
|
||||||
|
</div>
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.温度 }}℃
|
||||||
|
</div>
|
||||||
|
<div class="infoTableBodytd">
|
||||||
|
{{ objItem.湿度 }}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div class="rdio-group">
|
||||||
<div
|
<div
|
||||||
:class="[
|
:class="[
|
||||||
'radio-item',
|
'radio-item',
|
||||||
|
@ -179,18 +229,24 @@
|
||||||
<div
|
<div
|
||||||
:class="[
|
:class="[
|
||||||
'radio-item',
|
'radio-item',
|
||||||
objItem.state == 20 ? 'orangeIcon' : '',
|
objItem.state == 20
|
||||||
|
? 'redIcon'
|
||||||
|
: objItem.state == 30
|
||||||
|
? 'redIcon'
|
||||||
|
: objItem.state == 40
|
||||||
|
? 'redIcon'
|
||||||
|
: '',
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<el-icon class="radio-ico"
|
<el-icon class="radio-ico"
|
||||||
><el-icon-removeFilled
|
><el-icon-warningFilled
|
||||||
/></el-icon>
|
/></el-icon>
|
||||||
<span>待机</span>
|
<span>停机</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="[
|
:class="[
|
||||||
'radio-item',
|
'radio-item',
|
||||||
objItem.state == 30 ? 'redIcon' : '',
|
objItem.state == 50 ? 'redIcon' : '',
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<el-icon class="radio-ico"
|
<el-icon class="radio-ico"
|
||||||
|
@ -199,47 +255,6 @@
|
||||||
<span>离线</span>
|
<span>离线</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
v-else-if="
|
|
||||||
objItem.type == 40 && objItem.cate_code == 'cems'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div class="infoTableTr">
|
|
||||||
<div class="infoTableHeadTh">颗粒物</div>
|
|
||||||
<div class="infoTableHeadTh">SO₂</div>
|
|
||||||
<div class="infoTableHeadTh">NOx</div>
|
|
||||||
</div>
|
|
||||||
<div class="infoTableTr">
|
|
||||||
<div class="infoTableBodytd">13.00mg/m³</div>
|
|
||||||
<div class="infoTableBodytd">13.00mg/m³</div>
|
|
||||||
<div class="infoTableBodytd">13.00mg/m³</div>
|
|
||||||
</div>
|
|
||||||
<div class="infoTableTr">
|
|
||||||
<div class="infoTableHeadTh">流量</div>
|
|
||||||
<div class="infoTableHeadTh">温度</div>
|
|
||||||
<div class="infoTableHeadTh">湿度</div>
|
|
||||||
</div>
|
|
||||||
<div class="infoTableTr">
|
|
||||||
<div class="infoTableBodytd">22320.000m³/h</div>
|
|
||||||
<div class="infoTableBodytd">70.54℃</div>
|
|
||||||
<div class="infoTableBodytd">0.80%</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-else-if="
|
|
||||||
objItem.type == 40 && objItem.cate_code == 'tsp'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div class="infoTableTr">
|
|
||||||
<div class="infoTableHeadTh">TSP</div>
|
|
||||||
<div class="infoTableHeadTh">温度</div>
|
|
||||||
<div class="infoTableHeadTh">湿度</div>
|
|
||||||
</div>
|
|
||||||
<div class="infoTableTr">
|
|
||||||
<div class="infoTableBodytd">0.18mg/m³</div>
|
|
||||||
<div class="infoTableBodytd">18.6℃</div>
|
|
||||||
<div class="infoTableBodytd">53.4%</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="bodyTitle"><span class="titleIcon"></span>历史监测</p>
|
<p class="bodyTitle"><span class="titleIcon"></span>历史监测</p>
|
||||||
|
@ -285,15 +300,15 @@ export default {
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
var result = "";
|
var result = "";
|
||||||
let text =
|
let text =
|
||||||
params[0].data[1] == 1
|
params[0].data[1] == 10
|
||||||
? "运行"
|
? "运行"
|
||||||
: params[0].data[1] == 0
|
: params[0].data[1] == 50
|
||||||
? "待机"
|
? "离线"
|
||||||
: "故障";
|
: "停机";
|
||||||
let colors =
|
let colors =
|
||||||
text == "运行"
|
text == "运行"
|
||||||
? "#21a51f"
|
? "#21a51f"
|
||||||
: text == "待机"
|
: text == "停机"
|
||||||
? "#ff8608"
|
? "#ff8608"
|
||||||
: "#c7c7c7";
|
: "#c7c7c7";
|
||||||
var lineHtml =
|
var lineHtml =
|
||||||
|
@ -345,26 +360,45 @@ export default {
|
||||||
},
|
},
|
||||||
pieces: [
|
pieces: [
|
||||||
{
|
{
|
||||||
gt: 0.5,
|
gt: 1,
|
||||||
lte: 1,
|
lte: 11,
|
||||||
label: "运行",
|
label: "运行",
|
||||||
color: "#21a51f",
|
color: "#21a51f",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
gt: -0.5,
|
gt: 15,
|
||||||
lte: 0.5,
|
lte: 45,
|
||||||
label: "待机",
|
label: "停机",
|
||||||
color: "#ff8608",
|
color: "#ff8608",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
gt: -1,
|
gt: 46,
|
||||||
lte: -0.5,
|
lte: 55,
|
||||||
label: "离线",
|
label: "离线",
|
||||||
color: "#c7c7c7",
|
color: "#c7c7c7",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
series: [{ type: "line" }],
|
series: [
|
||||||
|
{
|
||||||
|
type: "line",
|
||||||
|
encode: { y: "运行状态", seriesName: ["运行状态"] },
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: function (params) {
|
||||||
|
var value = params.value;
|
||||||
|
if (value < 15) {
|
||||||
|
return "#21a51f";
|
||||||
|
} else if (value >= 15 && value < 45) {
|
||||||
|
return "#ff8608";
|
||||||
|
} else {
|
||||||
|
return "c7c7c7";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
modelPosition: [
|
modelPosition: [
|
||||||
{ lng: 88.64154268696439, lat: 42.721977308996635 },
|
{ lng: 88.64154268696439, lat: 42.721977308996635 },
|
||||||
|
@ -547,7 +581,7 @@ export default {
|
||||||
myChart.showLoading();
|
myChart.showLoading();
|
||||||
// 使用刚指定的配置项和数据显示图表。
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
// myChart.setOption(option)
|
// myChart.setOption(option)
|
||||||
this.$API.bi.dataset.exec.req("eq_status", params).then((res) => {
|
this.$API.bi.dataset.exec.req("enp_edata2", params).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
let newOption = Object.assign({}, this.basicOption);
|
let newOption = Object.assign({}, this.basicOption);
|
||||||
newOption.dataset.source = res.data.ds0;
|
newOption.dataset.source = res.data.ds0;
|
||||||
|
@ -629,18 +663,21 @@ export default {
|
||||||
item.coordinates.longitude &&
|
item.coordinates.longitude &&
|
||||||
item.coordinates.latitude
|
item.coordinates.latitude
|
||||||
) {
|
) {
|
||||||
|
console.log(item);
|
||||||
let imgUrl = that.getItemIcon(item.cate_code);
|
let imgUrl = that.getItemIcon(item.cate_code);
|
||||||
let lon = parseFloat(item.coordinates.longitude);
|
let lon = parseFloat(item.coordinates.longitude);
|
||||||
let lat = parseFloat(item.coordinates.latitude);
|
let lat = parseFloat(item.coordinates.latitude);
|
||||||
let height = parseInt(item.coordinates.height);
|
let height = parseInt(item.coordinates.height);
|
||||||
let type = item.cate_code;
|
|
||||||
let arrs = {
|
let arrs = {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
lon: lon,
|
lon: lon,
|
||||||
lat: lat,
|
lat: lat,
|
||||||
height: height,
|
height: height,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
type: type,
|
type: item.cate_code,
|
||||||
|
cate_code: item.cate_code,
|
||||||
|
state: item.running_state,
|
||||||
|
is_online: item.is_online,
|
||||||
};
|
};
|
||||||
let config = {
|
let config = {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -667,8 +704,11 @@ export default {
|
||||||
lon,
|
lon,
|
||||||
lat,
|
lat,
|
||||||
id = "11111",
|
id = "11111",
|
||||||
type = "display",
|
type,
|
||||||
height,
|
height,
|
||||||
|
is_online,
|
||||||
|
cate_code,
|
||||||
|
state,
|
||||||
} = attrs;
|
} = attrs;
|
||||||
const {
|
const {
|
||||||
show = true,
|
show = true,
|
||||||
|
@ -687,6 +727,9 @@ export default {
|
||||||
attrs: attrs,
|
attrs: attrs,
|
||||||
id: id,
|
id: id,
|
||||||
type: type,
|
type: type,
|
||||||
|
is_online: is_online,
|
||||||
|
cate_code: cate_code,
|
||||||
|
state: state,
|
||||||
position: Cesium.Cartesian3.fromDegrees(
|
position: Cesium.Cartesian3.fromDegrees(
|
||||||
lon || 117.08387268794274,
|
lon || 117.08387268794274,
|
||||||
lat || 31.6557737395655433,
|
lat || 31.6557737395655433,
|
||||||
|
@ -738,14 +781,60 @@ export default {
|
||||||
},
|
},
|
||||||
//调用此方法获取相关信息显示在页面
|
//调用此方法获取相关信息显示在页面
|
||||||
getInfo(equpmentId) {
|
getInfo(equpmentId) {
|
||||||
|
console.log("this.objItem------clickItem", this.objItem);
|
||||||
let that = this;
|
let that = this;
|
||||||
that.infoShow = true;
|
that.infoShow = true;
|
||||||
console.log(equpmentId);
|
console.log(equpmentId);
|
||||||
//根据id获取相关信息
|
// //根据id获取相关信息
|
||||||
this.$API.em.equipment.item.req(equpmentId).then((res) => {
|
// this.$API.em.equipment.item.req(equpmentId).then((res) => {
|
||||||
that.objItem = res;
|
// that.objItem = res;
|
||||||
|
// console.log(res);
|
||||||
|
// });
|
||||||
|
if (that.objItem.type == "tsp" || that.objItem.type == "cems") {
|
||||||
|
let nowDate = new Date();
|
||||||
|
let startDate = new Date();
|
||||||
|
let year = nowDate.getFullYear();
|
||||||
|
let month = nowDate.getMonth() + 1;
|
||||||
|
let day = nowDate.getDate();
|
||||||
|
let hour = nowDate.getHours();
|
||||||
|
month = month < 10 ? "0" + month : month;
|
||||||
|
day = day < 10 ? "0" + day : day;
|
||||||
|
hour = hour < 10 ? "0" + hour : hour;
|
||||||
|
let start_time =
|
||||||
|
year + "-" + month + "-" + day + " " + hour + ":00:00";
|
||||||
|
let end_time =
|
||||||
|
year + "-" + month + "-" + day + " " + hour + ":59:00";
|
||||||
|
let params = {
|
||||||
|
query: {
|
||||||
|
end_time: end_time,
|
||||||
|
start_time: start_time,
|
||||||
|
time_bucket: "1 hour",
|
||||||
|
equipment_id: this.objItem.id,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
this.$API.bi.dataset.exec
|
||||||
|
.req("enp_edata2", params)
|
||||||
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
if (res.data2.ds0 && res.data2.ds0.length > 0) {
|
||||||
|
if (that.objItem.type == "tsp") {
|
||||||
|
that.objItem.tsp = res.data2.ds0[0].tsp;
|
||||||
|
that.objItem.温度 = res.data2.ds0[0].温度;
|
||||||
|
that.objItem.湿度 = res.data2.ds0[0].湿度;
|
||||||
|
} else if (that.objItem.type == "cems") {
|
||||||
|
that.objItem.流量 = res.data2.ds0[0].流量;
|
||||||
|
that.objItem.湿度 = res.data2.ds0[0].湿度;
|
||||||
|
that.objItem.温度 = res.data2.ds0[0].温度;
|
||||||
|
that.objItem.so2折算值 =
|
||||||
|
res.data2.ds0[0].so2折算值;
|
||||||
|
that.objItem.nox折算值 =
|
||||||
|
res.data2.ds0[0].nox折算值;
|
||||||
|
that.objItem.颗粒物折算值 =
|
||||||
|
res.data2.ds0[0].颗粒物折算值;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
this.getChartTime();
|
this.getChartTime();
|
||||||
},
|
},
|
||||||
initChart() {
|
initChart() {
|
||||||
|
|
Loading…
Reference in New Issue