diff --git a/public/9M.glb b/public/9M.glb new file mode 100644 index 00000000..3eb285ed Binary files /dev/null and b/public/9M.glb differ diff --git a/public/photon_tree.glb b/public/photon_tree.glb new file mode 100644 index 00000000..a6822ca9 Binary files /dev/null and b/public/photon_tree.glb differ diff --git a/public/tree.glb b/public/tree.glb new file mode 100644 index 00000000..c5c5b280 Binary files /dev/null and b/public/tree.glb differ diff --git a/src/views/bigScreen/cesiumtest.vue b/src/views/bigScreen/cesiumtest.vue index 7550eeee..b4001a87 100644 --- a/src/views/bigScreen/cesiumtest.vue +++ b/src/views/bigScreen/cesiumtest.vue @@ -157,62 +157,26 @@ > 实时监测

-

+

实时状态

-
-
- - 运行 -
-
- - 待机 -
-
- - 离线 -
-
-
+
颗粒物
SO₂
NOx
-
13.00mg/m³
-
13.00mg/m³
-
13.00mg/m³
+
+ {{ objItem.颗粒物折算值 }}mg/m³ +
+
+ {{ objItem.so2折算值 }}mg/m³ +
+
+ {{ objItem.nox折算值 }}mg/m³ +
流量
@@ -220,25 +184,76 @@
湿度
-
22320.000m³/h
-
70.54℃
-
0.80%
+
+ {{ objItem.流量 }}m³/h +
+
+ {{ objItem.温度 }}℃ +
+
+ {{ objItem.湿度 }}% +
-
+
TSP
温度
湿度
-
0.18mg/m³
-
18.6℃
-
53.4%
+
+ {{ objItem.tsp }}mg/m³ +
+
+ {{ objItem.温度 }}℃ +
+
+ {{ objItem.湿度 }}% +
+
+
+
+
+
+ + 运行 +
+
+ + 停机 +
+
+ + 离线 +
@@ -285,15 +300,15 @@ export default { formatter: function (params) { var result = ""; let text = - params[0].data[1] == 1 + params[0].data[1] == 10 ? "运行" - : params[0].data[1] == 0 - ? "待机" - : "故障"; + : params[0].data[1] == 50 + ? "离线" + : "停机"; let colors = text == "运行" ? "#21a51f" - : text == "待机" + : text == "停机" ? "#ff8608" : "#c7c7c7"; var lineHtml = @@ -345,26 +360,45 @@ export default { }, pieces: [ { - gt: 0.5, - lte: 1, + gt: 1, + lte: 11, label: "运行", color: "#21a51f", }, { - gt: -0.5, - lte: 0.5, - label: "待机", + gt: 15, + lte: 45, + label: "停机", color: "#ff8608", }, { - gt: -1, - lte: -0.5, + gt: 46, + lte: 55, label: "离线", 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: [ { lng: 88.64154268696439, lat: 42.721977308996635 }, @@ -547,7 +581,7 @@ export default { myChart.showLoading(); // 使用刚指定的配置项和数据显示图表。 // 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); let newOption = Object.assign({}, this.basicOption); newOption.dataset.source = res.data.ds0; @@ -629,18 +663,21 @@ export default { item.coordinates.longitude && item.coordinates.latitude ) { + console.log(item); let imgUrl = that.getItemIcon(item.cate_code); let lon = parseFloat(item.coordinates.longitude); let lat = parseFloat(item.coordinates.latitude); let height = parseInt(item.coordinates.height); - let type = item.cate_code; let arrs = { name: item.name, lon: lon, lat: lat, height: height, 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 = { show: true, @@ -667,8 +704,11 @@ export default { lon, lat, id = "11111", - type = "display", + type, height, + is_online, + cate_code, + state, } = attrs; const { show = true, @@ -687,6 +727,9 @@ export default { attrs: attrs, id: id, type: type, + is_online: is_online, + cate_code: cate_code, + state: state, position: Cesium.Cartesian3.fromDegrees( lon || 117.08387268794274, lat || 31.6557737395655433, @@ -738,14 +781,60 @@ export default { }, //调用此方法获取相关信息显示在页面 getInfo(equpmentId) { + console.log("this.objItem------clickItem", this.objItem); let that = this; that.infoShow = true; console.log(equpmentId); - //根据id获取相关信息 - this.$API.em.equipment.item.req(equpmentId).then((res) => { - that.objItem = res; - console.log(res); - }); + // //根据id获取相关信息 + // this.$API.em.equipment.item.req(equpmentId).then((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); + 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(); }, initChart() {