Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
789f8da088
|
@ -81,17 +81,29 @@
|
|||
<span>离线</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="objItem.type==40">
|
||||
<div class="infoTableTr" v-if="objItem.cate_code=='cems'">
|
||||
<div class="infoTableHeadTh">PM2.5</div>
|
||||
<div class="infoTableHeadTh">PM10</div>
|
||||
<div class="infoTableHeadTh">风速</div>
|
||||
</div>
|
||||
<div class="infoTableTr" v-if="objItem.cate_code=='cems'">
|
||||
<div class="infoTableBodytd">13.00μg/m³</div>
|
||||
<div class="infoTableBodytd">13.00μg/m³</div>
|
||||
<div class="infoTableBodytd">0.5m/s</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>
|
||||
|
@ -374,21 +386,23 @@ export default {
|
|||
var url = "factory.glb";
|
||||
var height = 0;
|
||||
viewer.entities.removeAll() //加载之前先清楚所有entity
|
||||
var position = Cesium.Cartesian3.fromDegrees(87.62594666147378, 42.975362631477815, height)
|
||||
var heading = Cesium.Math.toRadians(310) //135度转弧度
|
||||
var position = Cesium.Cartesian3.fromDegrees(88.644, 42.7229, height)
|
||||
var heading = Cesium.Math.toRadians(191) //310度转弧度
|
||||
var pitch = Cesium.Math.toRadians(0);
|
||||
var roll = Cesium.Math.toRadians(0);
|
||||
var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll)
|
||||
var orientation = Cesium.Transforms.headingPitchRollQuaternion(
|
||||
position,hpr
|
||||
)
|
||||
var modelScale = 30.0; // 假设模型原始单位是厘米,需要转换为米
|
||||
var modelEntity = viewer.entities.add({
|
||||
name: 'photon',
|
||||
position: position,
|
||||
orientation: orientation,
|
||||
model: {
|
||||
uri: url,//注意entitits.add方式加载gltf文件时,这里是uri,不是url,并且这种方式只能加载.glb格式的文件
|
||||
scale: 1.0,//缩放比例
|
||||
scale: modelScale,//缩放比例
|
||||
modelMatrix: Cesium.Transforms.eastNorthUpToFixedFrame(position),
|
||||
minimumPixelSize: 256,//最小像素大小,可以避免太小看不见
|
||||
maximumScale: 20000,//模型的最大比例尺大小。minimumPixelSize的上限
|
||||
incrementallyLoadTextures: true,//加载模型后纹理是否可以继续流入
|
||||
|
@ -396,15 +410,18 @@ export default {
|
|||
heightReference: Cesium.HeightReference.NONE
|
||||
},
|
||||
})
|
||||
viewer.trackedEntity = modelEntity; // 聚焦模型
|
||||
viewer.zoomTo(modelEntity, new Cesium.HeadingPitchRange(-4.2, -0.5, 30));
|
||||
viewer.trackedEntity = modelEntity; // 聚焦模型
|
||||
//设置相机位置
|
||||
viewer.zoomTo(modelEntity, new Cesium.HeadingPitchRange(-3.1, -0.6, 900));
|
||||
that.getEquipmentList();
|
||||
// 监听鼠标左键点击事件
|
||||
var handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
|
||||
handler.setInputAction(function (click) {
|
||||
var feature = viewer.scene.pick(click.position);
|
||||
that.objItem = feature.id._attrs;
|
||||
that.getInfo(feature.id._id);
|
||||
if (feature.id._attrs) {
|
||||
that.objItem = feature.id._attrs;
|
||||
that.getInfo(feature.id._id);
|
||||
}
|
||||
if (Cesium.defined(feature)) {
|
||||
// 判断点击位置是否有模型被选中
|
||||
var pickedPosition = viewer.scene.pickPosition(click.position);
|
||||
|
@ -423,7 +440,6 @@ export default {
|
|||
}
|
||||
},
|
||||
Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
||||
|
||||
},
|
||||
methods: {
|
||||
getChartTime() {
|
||||
|
@ -522,7 +538,7 @@ export default {
|
|||
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) + 0.5;
|
||||
let height = parseInt(item.coordinates.height) + 15;
|
||||
let type = item.cate_code;
|
||||
let arrs = { name:item.name, lon: lon, lat:lat, height:height, id:item.id, type: type };
|
||||
let config = { show: true, fontSize: '16px', fillColor: '#ffffff', fillWidth: 1, pixelOffsetX: 10, pixelOffsetY: -30, image: imgUrl, imgWidth: 50, imgHeight: 50, textDistance: 550000, imgDistance: 550000 };
|
||||
|
|
|
@ -385,7 +385,7 @@ export default {
|
|||
series: {
|
||||
name: '今日车辆数量统计',
|
||||
type: 'pie',
|
||||
radius: [35, 55],
|
||||
radius: [25, 45],
|
||||
center: ['50%', '50%'],
|
||||
emphasis: {
|
||||
focus: 'series',
|
||||
|
@ -974,6 +974,7 @@ header {
|
|||
|
||||
.blockTitleImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
|
Loading…
Reference in New Issue