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

更改

parent c73cd78f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com * @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-21 09:24:11 * @Date: 2022-06-21 09:24:11
* @LastEditors: 纪泽龙 jizelong@qq.com * @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 * @FilePath: /danger-manage-web/src/components/bigWindow/Danger.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
...@@ -37,21 +37,50 @@ ...@@ -37,21 +37,50 @@
<span class="left">监测值:</span <span class="left">监测值:</span
><span v-unValue class="right">{{ deviceData.jcz }}</span> ><span v-unValue class="right">{{ deviceData.jcz }}</span>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getInfo } from "@/api/map/deviceInfo";
export default { export default {
name: "tcq", name: "tcq",
data() { data() {
return {}; return {
deviceData: null,
};
}, },
mounted() { created() {
console.log(this.deviceData); // console.log(this.deviceData);
this.$nextTick(() => {
this.getInfo(this.deviceData.deviceId);
});
}, },
methods: { 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() { close() {
//this.handleClose(); //this.handleClose();
this.mapClass.clearInfoWindow(); this.mapClass.clearInfoWindow();
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2022-02-25 17:07:40 * @Date: 2022-02-25 17:07:40
* @LastEditTime: 2022-02-26 20:59:40 * @LastEditTime: 2022-10-10 10:01:14
* @LastEditors: Please set LastEditors * @LastEditors: 纪泽龙 jizelong@qq.com
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @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 * @FilePath: /newDev/gassafety-progress/gassafetyprogress-web/src/directive/permission/hasValue.js
*/ */
...@@ -11,8 +11,19 @@ ...@@ -11,8 +11,19 @@
* Copyright (c) 2021 gassafety * Copyright (c) 2021 gassafety
*/ */
export default { export default {
inserted(el, binding, vnode) { 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 * @Author: your name
* @Date: 2021-12-07 14:19:18 * @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 * @LastEditors: 纪泽龙 jizelong@qq.com
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /cesium-vue/src/utils/seieumClass.js * @FilePath: /cesium-vue/src/utils/seieumClass.js
...@@ -828,7 +828,7 @@ export default class CreateCesium { ...@@ -828,7 +828,7 @@ export default class CreateCesium {
this.deviceTilesArr[deviceType] = []; this.deviceTilesArr[deviceType] = [];
} }
this.deviceTilesArr[deviceType].push(obj); this.deviceTilesArr[deviceType].push(obj);
console.log("obj", obj); // console.log("obj", obj);
// } // }
} else { } else {
// arr.forEach((item) => { // arr.forEach((item) => {
......
<!-- <!--
* @Author: 纪泽龙 jizelong@qq.com * @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-16 15:03:40 * @Date: 2022-09-29 16:57:34
* @LastEditors: 纪泽龙 jizelong@qq.com * @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-09-30 17:16:23 * @LastEditTime: 2022-10-10 10:12:39
* @FilePath: /danger-manage-web/src/views/bigwindow/index.vue * @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 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<template> <template>
<div class="big-window"> <div class="index-wrapper">
<!-- <button @click="$router.push('/')">idnex</button> --> <Index :charsShow="false" />
<!-- <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> </div>
</template> </template>
<script> <script>
import CreateCesium, { DEVICE_PIC_TYPE } from "@/utils/cesium/cesiumClass.js"; import Index from "@/views/index.vue";
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";
// 危险源实时监测
export default { export default {
name: "monitor", name: "",
components: { components: {
Editor, Index,
}, },
data() { data() {
return { 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();
}, },
methods: {},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.big-window { .index-wrapper {
width: 100%; width: 100%;
// height: 100%;
height: calc(100vh - 50px); height: calc(100vh - 50px);
#mapbox { // height: 100vh;
width: 100%; // background: red;
height: 100%; position: relative;
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;
}
} }
</style> </style>
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
* @Author: 纪泽龙 jizelong@qq.com * @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-03 10:51:24 * @Date: 2022-09-03 10:51:24
* @LastEditors: 纪泽龙 jizelong@qq.com * @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 * @FilePath: /danger-manage-web/src/views/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<template> <template>
<div class="index-wrapper"> <div class="index-wrapper">
<Top /> <Top />
<Left <Left v-if="charsShow"
ref="left" ref="left"
@clickShow="clickShow" @clickShow="clickShow"
@dangerDeviceChange="dangerDeviceChange" @dangerDeviceChange="dangerDeviceChange"
/> />
<Right ref="right" /> <Right v-if="charsShow" ref="right" />
<Bottom <Bottom
v-show="deviceOrDangerType == 1" v-show="deviceOrDangerType == 1"
@deviceChange="deviceChange" @deviceChange="deviceChange"
...@@ -43,6 +43,12 @@ import Bottom from "@/views/indexComponents/Bottom"; ...@@ -43,6 +43,12 @@ import Bottom from "@/views/indexComponents/Bottom";
import { deviceInfoLists } from "@/api/map/deviceInfo"; import { deviceInfoLists } from "@/api/map/deviceInfo";
export default { export default {
name: "shouye", name: "shouye",
props:{
charsShow:{
type:Boolean,
default:true,
}
},
components: { components: {
Top, Top,
Left, Left,
...@@ -191,56 +197,56 @@ export default { ...@@ -191,56 +197,56 @@ export default {
], ],
data11: [ data11: [
{ {
deviceType: 11, deviceType: 5,
longitude: 114.07848044941088, longitude: 114.07848044941088,
latitude: 38.24830985372926, latitude: 38.24830985372926,
shortNum: 10, shortNum: 10,
title: "视频1", title: "视频1",
}, },
{ {
deviceType: 11, deviceType: 5,
longitude: 114.07858975280202, longitude: 114.07858975280202,
latitude: 38.24853877908846, latitude: 38.24853877908846,
shortNum: 16, shortNum: 16,
title: "视频2", title: "视频2",
}, },
{ {
deviceType: 11, deviceType: 5,
longitude: 114.0788726514246, longitude: 114.0788726514246,
latitude: 38.24854905109693, latitude: 38.24854905109693,
shortNum: 16, shortNum: 16,
title: "视频3", title: "视频3",
}, },
{ {
deviceType: 11, deviceType: 5,
longitude: 114.07933673582353, longitude: 114.07933673582353,
latitude: 38.24932372451273, latitude: 38.24932372451273,
shortNum: 10, shortNum: 10,
title: "视频4", title: "视频4",
}, },
{ {
deviceType: 11, deviceType: 5,
longitude: 114.07943113040781, longitude: 114.07943113040781,
latitude: 38.249634714126636, latitude: 38.249634714126636,
shortNum: 16, shortNum: 16,
title: "视频5", title: "视频5",
}, },
{ {
deviceType: 11, deviceType: 5,
longitude: 114.08000305885355, longitude: 114.08000305885355,
latitude: 38.2494852174479, latitude: 38.2494852174479,
shortNum: 16, shortNum: 16,
title: "视频6", title: "视频6",
}, },
{ {
deviceType: 11, deviceType: 5,
longitude: 114.08007200486942, longitude: 114.08007200486942,
latitude: 38.249835018521594, latitude: 38.249835018521594,
shortNum: 16, shortNum: 16,
title: "视频7", title: "视频7",
}, },
{ {
deviceType: 11, deviceType: 5,
longitude: 114.07771206027549, longitude: 114.07771206027549,
latitude: 38.252223651533114, latitude: 38.252223651533114,
shortNum: 16, shortNum: 16,
...@@ -380,10 +386,10 @@ export default { ...@@ -380,10 +386,10 @@ export default {
this.Cesium.addDanger(item, Danger); this.Cesium.addDanger(item, Danger);
}); });
// this.data11.forEach((item) => { this.data11.forEach((item) => {
// item.config = { scale: 1, textHeight: -32 }; item.config = { scale: 1, textHeight: -32 };
// this.Cesium.addDevice(item, "pic", Video); this.Cesium.addDevice(item, "pic", Video);
// }); });
// this.data12.forEach((item) => { // this.data12.forEach((item) => {
// item.config = { scale: 1, textHeight: -94 }; // item.config = { scale: 1, textHeight: -94 };
// this.Cesium.addDevice(item, "pic", tcq); // this.Cesium.addDevice(item, "pic", tcq);
...@@ -403,14 +409,15 @@ export default { ...@@ -403,14 +409,15 @@ export default {
obj = { obj = {
latitude: item.latitude, latitude: item.latitude,
longitude: item.longitude, longitude: item.longitude,
deviceId:item.mapDeviceId,
shortNum: 10, shortNum: 10,
deviceType: item.mapDeviceType, deviceType: item.mapDeviceType,
title: item.mapDeviceName, title: item.mapDeviceName,
scale: 1, config : { scale: 1, textHeight: -32 },
textHeight: -32,
}; };
} else { } else {
obj = { obj = {
deviceId:item.mapDeviceId,
latitude: item.latitude, latitude: item.latitude,
longitude: item.longitude, longitude: item.longitude,
deviceType: item.mapDeviceType, deviceType: item.mapDeviceType,
...@@ -423,8 +430,7 @@ export default { ...@@ -423,8 +430,7 @@ export default {
sbzt: item.monitorDeviceStatus, sbzt: item.monitorDeviceStatus,
jcz: item.monitorValue + "" + item.mapDeviceUnit, jcz: item.monitorValue + "" + item.mapDeviceUnit,
shortNum: 12, shortNum: 12,
scale: 2, config : { scale: 1, textHeight: -94 },
textHeight: -94,
}; };
} }
return obj; 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