Commit c73cd78f authored by 纪泽龙's avatar 纪泽龙

重新上图

parent a6f511f0
/*
* @Author: your name
* @Date: 2021-12-07 14:19:18
* @LastEditTime: 2022-10-07 15:24:09
* @LastEditTime: 2022-10-09 17:39:21
* @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
......@@ -41,25 +41,44 @@ export const DEVICE_PIC_TYPE = {
ZHIYEWEIHAI: 4,
YINHUAN: 5,
};
// 死数据用的
// const DEVICE_PIC_URL = {
// 1: require("@/assets/marks/jiankong.png"),
// 2: require("@/assets/marks/weixian.png"),
// 3: require("@/assets/marks/qttcq.png"),
// 4: require("@/assets/marks/yltcq.png"),
// 11: require("@/assets/indexImages/bottom/videoUrl.png"),
// 12: require("@/assets/indexImages/bottom/qtbjqUrl.png"),
// 13: require("@/assets/indexImages/bottom/ydtcqUrl.png"),
// 14: require("@/assets/indexImages/bottom/yltcqUrl.png"),
// 15: require("@/assets/indexImages/bottom/wdtcqUrl.png"),
// // 首页的
// };
const DEVICE_PIC_URL = {
1: require("@/assets/marks/jiankong.png"),
2: require("@/assets/marks/weixian.png"),
3: require("@/assets/marks/qttcq.png"),
4: require("@/assets/marks/yltcq.png"),
// 4: require("@/assets/indexImages/bottom/1.png"),
11: require("@/assets/indexImages/bottom/videoUrl.png"),
12: require("@/assets/indexImages/bottom/qtbjqUrl.png"),
13: require("@/assets/indexImages/bottom/ydtcqUrl.png"),
14: require("@/assets/indexImages/bottom/yltcqUrl.png"),
15: require("@/assets/indexImages/bottom/wdtcqUrl.png"),
// 工业探测器
1: require("@/assets/indexImages/bottom/gytcqUrl.png"),
// 温度变送器
2: require("@/assets/indexImages/bottom/wdbsqUrl.png"),
// 压力监测设备
3: require("@/assets/indexImages/bottom/yljcqUrl.png"),
// 液位探测器
4: require("@/assets/indexImages/bottom/ywtcqUrl.png"),
// 摄像头
5: require("@/assets/indexImages/bottom/video2.png"),
// 11: require("@/assets/indexImages/bottom/videoUrl.png"),
// 12: require("@/assets/indexImages/bottom/qtbjqUrl.png"),
// 13: require("@/assets/indexImages/bottom/ydtcqUrl.png"),
// 14: require("@/assets/indexImages/bottom/yltcqUrl.png"),
// 15: require("@/assets/indexImages/bottom/wdtcqUrl.png"),
// 首页的
};
const DEVICE_PIC_URL_WRING = {
12: require("@/assets/indexImages/bottom/qtbjqUrlWring.png"),
// 12: require("@/assets/indexImages/bottom/qtbjqUrlWring.png"),
};
const DEVICE_PIC_URL_ALARM = {
12: require("@/assets/indexImages/bottom/qtbjqUrlAlarm.png"),
// 12: require("@/assets/indexImages/bottom/qtbjqUrlAlarm.png"),
};
const arr = [];
const dangerColor = {
......@@ -781,14 +800,15 @@ export default class CreateCesium {
const { longitude, latitude, shortNum, deviceType, title, deviceState } =
item;
let imageUrl;
// 1正常,2警告,3报警,没有的就按原来的算
if (deviceState == 1 || !deviceState) {
imageUrl = DEVICE_PIC_URL[deviceType];
} else if (deviceState == 2) {
imageUrl = DEVICE_PIC_URL_WRING[deviceType];
} else {
imageUrl = DEVICE_PIC_URL_ALARM[deviceType];
}
// // 1正常,2警告,3报警,没有的就按原来的算
// if (deviceState == 1 || !deviceState) {
// imageUrl = DEVICE_PIC_URL[deviceType];
// } else if (deviceState == 2) {
// imageUrl = DEVICE_PIC_URL_WRING[deviceType];
// } else {
// imageUrl = DEVICE_PIC_URL_ALARM[deviceType];
// }
imageUrl = DEVICE_PIC_URL[deviceType];
const obj = this.createPicture(
imageUrl,
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-03 10:51:24
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-09-30 17:23:02
* @LastEditTime: 2022-10-10 09:30:59
* @FilePath: /danger-manage-web/src/views/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -39,6 +39,8 @@ import Top from "@/views/indexComponents/Top";
import Left from "@/views/indexComponents/Left";
import Right from "@/views/indexComponents/Right";
import Bottom from "@/views/indexComponents/Bottom";
import { deviceInfoLists } from "@/api/map/deviceInfo";
export default {
name: "shouye",
components: {
......@@ -54,7 +56,7 @@ export default {
data2: [
{
deviceType: 2,
longitude: 114.081436341043262,
longitude: 114.081436341043262,
latitude: 38.24983817327583,
shortNum: 7,
title: "锅炉点火",
......@@ -71,7 +73,7 @@ export default {
},
{
deviceType: 2,
longitude: 114.07705728663734,
longitude: 114.07705728663734,
latitude: 38.249097661403205,
shortNum: 6,
title: "有害气体",
......@@ -365,6 +367,7 @@ export default {
// rootTopShowChange(boolean) {
// this.$parent.$parent.topShow = boolean;
// },
init() {
this.data2.forEach((item, index) => {
if (index == 0) {
......@@ -377,16 +380,63 @@ export default {
this.Cesium.addDanger(item, Danger);
});
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);
});
// 初始化危险源关闭
// 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);
// });
// // 初始化危险源关闭
this.Cesium.dangerAllShow(false);
this.deviceInfoLists();
},
deviceInfoLists() {
deviceInfoLists().then((res) => {
console.log("设备", res);
res
.map((item) => {
let obj;
// 视频
if (item.mapDeviceType == 5) {
obj = {
latitude: item.latitude,
longitude: item.longitude,
shortNum: 10,
deviceType: item.mapDeviceType,
title: item.mapDeviceName,
scale: 1,
textHeight: -32,
};
} else {
obj = {
latitude: item.latitude,
longitude: item.longitude,
deviceType: item.mapDeviceType,
title: item.mapDeviceName,
sbmc: item.mapDeviceName,
// 号
sbbh: item.mapDeviceNum,
// 探测介质
tcjz: item.mapDeviceMedium,
sbzt: item.monitorDeviceStatus,
jcz: item.monitorValue + "" + item.mapDeviceUnit,
shortNum: 12,
scale: 2,
textHeight: -94,
};
}
return obj;
})
.forEach((item) => {
if (item.deviceType == 5) {
this.Cesium.addDevice(item, "pic", Video);
} else {
this.Cesium.addDevice(item, "pic", tcq);
}
});
});
},
clickShow(e) {
// 控制两个组件的展示与隐藏
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-13 09:55:30
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-09-14 10:25:34
* @LastEditTime: 2022-10-09 17:39:15
* @FilePath: /danger-manage-web/src/views/indexComponents/Bottom.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -42,57 +42,78 @@
</template>
<script>
// 视频图标
import video1 from "@/assets/indexImages/bottom/video1.png";
import video2 from "@/assets/indexImages/bottom/video2.png";
// 气体报警器提标
import qtbjq1 from "@/assets/indexImages/bottom/qtbjq1.png";
import qtbjq2 from "@/assets/indexImages/bottom/qtbjq2.png";
// // 视频图标
// import video1 from "@/assets/indexImages/bottom/video1.png";
// import video2 from "@/assets/indexImages/bottom/video2.png";
// // 气体报警器提标
// import qtbjq1 from "@/assets/indexImages/bottom/qtbjq1.png";
// import qtbjq2 from "@/assets/indexImages/bottom/qtbjq2.png";
// 用电探测器
import ydtcq1 from "@/assets/indexImages/bottom/ydtcq1.png";
import ydtcq2 from "@/assets/indexImages/bottom/ydtcq2.png";
// // 用电探测器
// import ydtcq1 from "@/assets/indexImages/bottom/ydtcq1.png";
// import ydtcq2 from "@/assets/indexImages/bottom/ydtcq2.png";
// 压力探测器
import yltcq1 from "@/assets/indexImages/bottom/yltcq1.png";
import yltcq2 from "@/assets/indexImages/bottom/yltcq2.png";
// // 压力探测器
// import yltcq1 from "@/assets/indexImages/bottom/yltcq1.png";
// import yltcq2 from "@/assets/indexImages/bottom/yltcq2.png";
// 温度探测器
import wdtcq1 from "@/assets/indexImages/bottom/wdtcq1.png";
import wdtcq2 from "@/assets/indexImages/bottom/wdtcq2.png";
// // 温度探测器
// import wdtcq1 from "@/assets/indexImages/bottom/wdtcq1.png";
// import wdtcq2 from "@/assets/indexImages/bottom/wdtcq2.png";
// 工业探测器
import gytcq1 from "@/assets/indexImages/bottom/gytcq1.png";
import gytcq2 from "@/assets/indexImages/bottom/gytcq2.png";
// 温度变送器
import wdbsq1 from "@/assets/indexImages/bottom/wdbsq1.png";
import wdbsq2 from "@/assets/indexImages/bottom/wdbsq2.png";
// 压力监测设备
import yljcq1 from "@/assets/indexImages/bottom/yljcq1.png";
import yljcq2 from "@/assets/indexImages/bottom/yljcq2.png";
// 液位探测器
import ywtcq1 from "@/assets/indexImages/bottom/ywtcq1.png";
import ywtcq2 from "@/assets/indexImages/bottom/ywtcq2.png";
// 摄像头
import video1 from "@/assets/indexImages/bottom/video1.png";
import video2 from "@/assets/indexImages/bottom/video2.png";
export default {
name: "",
data() {
return {
data: [
{ name: "摄像头", icon: video1, iconActive: video2, deviceType: 11 },
{
name: "气体报警器",
icon: qtbjq1,
iconActive: qtbjq2,
deviceType: 12,
name: "工业探测器",
icon: gytcq1,
iconActive: gytcq2,
deviceType: 1,
},
{
name: "温度变送器",
icon: wdbsq1,
iconActive: wdbsq2,
deviceType: 2,
},
{
name: "用电探测器",
icon: ydtcq1,
iconActive: ydtcq2,
deviceType: 13,
name: "压力监测设备",
icon: yljcq1,
iconActive: yljcq2,
deviceType: 3,
},
{
name: "压力探测器",
icon: yltcq1,
iconActive: yltcq2,
deviceType: 14,
name: "液位探测器",
icon: ywtcq1,
iconActive: ywtcq2,
deviceType: 4,
},
{
name: "温度探测器",
icon: wdtcq1,
iconActive: wdtcq2,
deviceType: 15,
name: "摄像头",
icon: video1,
iconActive: video2,
deviceType: 5,
},
],
activeArr: [11, 12, 13, 14, 15],
activeArr: [1, 2, 3, 4, 5],
};
},
methods: {
......
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