Commit 4a000595 authored by 纪泽龙's avatar 纪泽龙

更改

parent c73cd78f
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-21 09:24:11
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-09-13 17:53:09
* @LastEditTime: 2022-10-10 10:01:57
* @FilePath: /danger-manage-web/src/components/bigWindow/Danger.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -37,21 +37,50 @@
<span class="left">监测值:</span
><span v-unValue class="right">{{ deviceData.jcz }}</span>
</div>
</div>
</div>
</template>
<script>
import { getInfo } from "@/api/map/deviceInfo";
export default {
name: "tcq",
data() {
return {};
return {
deviceData: null,
};
},
mounted() {
console.log(this.deviceData);
created() {
// console.log(this.deviceData);
this.$nextTick(() => {
this.getInfo(this.deviceData.deviceId);
});
},
methods: {
getInfo(id) {
getInfo(id).then((res) => {
const data = res.data;
const obj = {
deviceId: data.mapDeviceId,
latitude: data.latitude,
longitude: data.longitude,
deviceType: data.mapDeviceType,
title: data.mapDeviceName,
sbmc: data.mapDeviceName,
// 号
sbbh: item.mapDeviceNum,
// 探测介质
tcjz: data.mapDeviceMedium,
sbzt: data.monitorDeviceStatus,
jcz: data.monitorValue + "" + data.mapDeviceUnit,
shortNum: 12,
config: { scale: 1, textHeight: -94 },
};
this.deviceData = obj;
});
},
close() {
//this.handleClose();
this.mapClass.clearInfoWindow();
......
/*
* @Author: your name
* @Date: 2022-02-25 17:07:40
* @LastEditTime: 2022-02-26 20:59:40
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-10-10 10:01:14
* @LastEditors: 纪泽龙 jizelong@qq.com
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /newDev/gassafety-progress/gassafetyprogress-web/src/directive/permission/hasValue.js
*/
......@@ -11,8 +11,19 @@
* Copyright (c) 2021 gassafety
*/
export default {
export default {
inserted(el, binding, vnode) {
el.innerHTML = el.innerHTML.replace(/\s+/g, "") ? el.innerHTML : "-";
}
// console.log("开始")
if (!el.innerHTML.replace(/\s+/g, "")) {
el.innerHTML = "-";
}
// el.innerHTML = el.innerHTML.replace(/\s+/g, "") ? el.innerHTML : "-";
},
componentUpdated(el, binding, vnode) {
// console.log("改变了", el.innerHTML);
// el.innerHTML = el.innerHTML.replace(/\s+/g, "") ? el.innerHTML : "-";
if (!el.innerHTML.replace(/\s+/g, "")) {
el.innerHTML = "-";
}
},
};
/*
* @Author: your name
* @Date: 2021-12-07 14:19:18
* @LastEditTime: 2022-10-09 17:39:21
* @LastEditTime: 2022-10-10 10:06:43
* @LastEditors: 纪泽龙 jizelong@qq.com
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /cesium-vue/src/utils/seieumClass.js
......@@ -828,7 +828,7 @@ export default class CreateCesium {
this.deviceTilesArr[deviceType] = [];
}
this.deviceTilesArr[deviceType].push(obj);
console.log("obj", obj);
// console.log("obj", obj);
// }
} else {
// arr.forEach((item) => {
......
<!--
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-16 15:03:40
* @Date: 2022-09-29 16:57:34
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-09-30 17:16:23
* @FilePath: /danger-manage-web/src/views/bigwindow/index.vue
* @LastEditTime: 2022-10-10 10:12:39
* @FilePath: /danger-manage-web/src/views/dangerControl/monitor/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="big-window">
<!-- <button @click="$router.push('/')">idnex</button> -->
<!-- <div class="danger">
<el-button @click="dangerChange" type="primary">{{
danger ? "隐藏危险区域" : "展示危险区域"
}}</el-button>
</div> -->
<!-- <div class="go-index">
<el-button @click="$router.push('/index')" type="primary"
>首页</el-button
>
</div> -->
<div id="mapbox"></div>
<div class="index-wrapper">
<Index :charsShow="false" />
</div>
</template>
<script>
import CreateCesium, { DEVICE_PIC_TYPE } from "@/utils/cesium/cesiumClass.js";
import Video from "@/components/bigWindow/video";
import tcq from "@/components/bigWindow/tcq";
import Null from "@/components/bigWindow/Null";
import Danger from "@/components/bigWindow/Danger";
import danger from "@/assets/images/danger.png";
import Editor from "@/components/Editor";
// 危险源实时监测
import Index from "@/views/index.vue";
export default {
name: "monitor",
name: "",
components: {
Editor,
Index,
},
data() {
return {
// Cesium: null,
danger: true,
data1: [
{
deviceType: 11,
longitude: 114.07848044941088,
latitude: 38.24830985372926,
shortNum: 10,
title: "视频1",
},
{
deviceType: 11,
longitude: 114.07858975280202,
latitude: 38.24853877908846,
shortNum: 16,
title: "视频2",
},
{
deviceType: 11,
longitude: 114.0788726514246,
latitude: 38.24854905109693,
shortNum: 16,
title: "视频3",
},
{
deviceType: 11,
longitude: 114.07933673582353,
latitude: 38.24932372451273,
shortNum: 10,
title: "视频4",
},
{
deviceType: 11,
longitude: 114.07943113040781,
latitude: 38.249634714126636,
shortNum: 16,
title: "视频5",
},
{
deviceType: 11,
longitude: 114.08000305885355,
latitude: 38.2494852174479,
shortNum: 16,
title: "视频6",
},
{
deviceType: 11,
longitude: 114.08007200486942,
latitude: 38.249835018521594,
shortNum: 16,
title: "视频7",
},
{
deviceType: 11,
longitude: 114.07771206027549,
latitude: 38.252223651533114,
shortNum: 16,
title: "视频8",
},
],
data2: [
{
deviceType: 3,
longitude: 114.08274961653991,
latitude: 38.24983876031178,
shortNum: 15,
title: "气体探测器",
sbmc: "气体探测器",
sbbh: "HBS030015037",
tcjz: "甲烷",
sbzt: "正常",
},
{
deviceType: 4,
longitude: 114.08344461545148,
latitude: 38.249814328043456,
shortNum: 15,
title: "压力探测器",
sbmc: "压力探测器",
sbbh: "HBS030015037",
tcjz: "压力",
sbzt: "正常",
jcz: "2.3MPa",
},
],
};
},
mounted() {
this.Cesium = new CreateCesium(
"mapbox",
["../3dtiles/jsondata/tileset.json"],
this
);
// this.danger.forEach((item) => {
// this.Cesium.addDanger(item, Danger);
// });
this.data1.forEach((item) => {
item.config = { scale: 1, textHeight: -32 };
this.Cesium.addDevice(item, "pic", Video);
});
this.data2.forEach((item) => {
this.Cesium.addDevice(item, "pic", tcq);
});
},
methods: {
dangerChange() {
this.danger = !this.danger;
// 当infowindow里存在danger-wrappeclass名称时,就清楚infowindow
this.Cesium.dangerTotal(this.danger, "danger-wrappe");
},
},
beforeDestroy() {
// 挂掉该关的 infowindow 跟计算infowindow位置的计时器
this.Cesium.clearInfoWindow();
this.Cesium.destroy();
return {};
},
methods: {},
};
</script>
<style lang="scss" scoped>
.big-window {
.index-wrapper {
width: 100%;
// height: 100%;
height: calc(100vh - 50px);
#mapbox {
width: 100%;
height: 100%;
overflow: hidden;
position: relative;
}
.danger {
position: fixed;
top: 20px;
right: 20px;
z-index: 10;
}
.go-index {
position: fixed;
top: 20px;
left: 20px;
z-index: 10;
}
// height: 100vh;
// background: red;
position: relative;
}
</style>
......@@ -2,19 +2,19 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-03 10:51:24
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-10-10 09:30:59
* @LastEditTime: 2022-10-10 10:07:01
* @FilePath: /danger-manage-web/src/views/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="index-wrapper">
<Top />
<Left
<Left v-if="charsShow"
ref="left"
@clickShow="clickShow"
@dangerDeviceChange="dangerDeviceChange"
/>
<Right ref="right" />
<Right v-if="charsShow" ref="right" />
<Bottom
v-show="deviceOrDangerType == 1"
@deviceChange="deviceChange"
......@@ -43,6 +43,12 @@ import Bottom from "@/views/indexComponents/Bottom";
import { deviceInfoLists } from "@/api/map/deviceInfo";
export default {
name: "shouye",
props:{
charsShow:{
type:Boolean,
default:true,
}
},
components: {
Top,
Left,
......@@ -191,56 +197,56 @@ export default {
],
data11: [
{
deviceType: 11,
deviceType: 5,
longitude: 114.07848044941088,
latitude: 38.24830985372926,
shortNum: 10,
title: "视频1",
},
{
deviceType: 11,
deviceType: 5,
longitude: 114.07858975280202,
latitude: 38.24853877908846,
shortNum: 16,
title: "视频2",
},
{
deviceType: 11,
deviceType: 5,
longitude: 114.0788726514246,
latitude: 38.24854905109693,
shortNum: 16,
title: "视频3",
},
{
deviceType: 11,
deviceType: 5,
longitude: 114.07933673582353,
latitude: 38.24932372451273,
shortNum: 10,
title: "视频4",
},
{
deviceType: 11,
deviceType: 5,
longitude: 114.07943113040781,
latitude: 38.249634714126636,
shortNum: 16,
title: "视频5",
},
{
deviceType: 11,
deviceType: 5,
longitude: 114.08000305885355,
latitude: 38.2494852174479,
shortNum: 16,
title: "视频6",
},
{
deviceType: 11,
deviceType: 5,
longitude: 114.08007200486942,
latitude: 38.249835018521594,
shortNum: 16,
title: "视频7",
},
{
deviceType: 11,
deviceType: 5,
longitude: 114.07771206027549,
latitude: 38.252223651533114,
shortNum: 16,
......@@ -380,10 +386,10 @@ export default {
this.Cesium.addDanger(item, Danger);
});
// this.data11.forEach((item) => {
// item.config = { scale: 1, textHeight: -32 };
// this.Cesium.addDevice(item, "pic", Video);
// });
this.data11.forEach((item) => {
item.config = { scale: 1, textHeight: -32 };
this.Cesium.addDevice(item, "pic", Video);
});
// this.data12.forEach((item) => {
// item.config = { scale: 1, textHeight: -94 };
// this.Cesium.addDevice(item, "pic", tcq);
......@@ -403,14 +409,15 @@ export default {
obj = {
latitude: item.latitude,
longitude: item.longitude,
deviceId:item.mapDeviceId,
shortNum: 10,
deviceType: item.mapDeviceType,
title: item.mapDeviceName,
scale: 1,
textHeight: -32,
config : { scale: 1, textHeight: -32 },
};
} else {
obj = {
deviceId:item.mapDeviceId,
latitude: item.latitude,
longitude: item.longitude,
deviceType: item.mapDeviceType,
......@@ -423,8 +430,7 @@ export default {
sbzt: item.monitorDeviceStatus,
jcz: item.monitorValue + "" + item.mapDeviceUnit,
shortNum: 12,
scale: 2,
textHeight: -94,
config : { scale: 1, textHeight: -94 },
};
}
return obj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment