diff --git a/src/api/factorResources/index.js b/src/api/factorResources/index.js
index 8fb0699..5b77c0c 100644
--- a/src/api/factorResources/index.js
+++ b/src/api/factorResources/index.js
@@ -54,4 +54,12 @@ export function camera_point(params) {
method:'get',
params
})
+}
+// 岗亭车
+export function patrol_point(params) {
+ return request({
+ url:'/ThreeProoFingsData/SentryBoxList',
+ method:'get',
+ params
+ })
}
\ No newline at end of file
diff --git a/src/views/factor/components/factorMap.vue b/src/views/factor/components/factorMap.vue
index 905013f..5f6fb06 100644
--- a/src/views/factor/components/factorMap.vue
+++ b/src/views/factor/components/factorMap.vue
@@ -29,6 +29,11 @@ export default {
type: Array,
default: () => [],
},
+ // 岗亭车
+ patrol_list: {
+ type: Array,
+ default: () => [],
+ },
// 车辆轨迹
new_line: {
type: Array,
@@ -124,7 +129,9 @@ export default {
imageOffset: new BMap.Size(0, 0, 5), // 设置图片偏移
}
);
- var camera_marker = new BMap.Marker(camera_point, { icon: camera_icon }); // 创建点位
+ var camera_marker = new BMap.Marker(camera_point, {
+ icon: camera_icon,
+ }); // 创建点位
map.addOverlay(camera_marker);
// camera_marker.addEventListener("click", function () {
// // 查看车辆轨迹
@@ -132,6 +139,23 @@ export default {
// that.$emit("get_car_text", item);
// });
});
+ // 感知设备点位上图
+ that.patrol_list.forEach((item) => {
+ var patrol_point = new BMap.Point(item.longitude, item.latitude);
+ // 自定义图标;
+ var patrol_icon = {};
+ patrol_icon = new BMap.Icon(
+ require("@/assets/factor/factor03.png"),
+ new BMap.Size(20, 40),
+ {
+ imageOffset: new BMap.Size(0, 0, 5), // 设置图片偏移
+ }
+ );
+ var patrol_marker = new BMap.Marker(patrol_point, {
+ icon: patrol_icon,
+ }); // 创建点位
+ map.addOverlay(patrol_marker);
+ });
}, 500);
map.centerAndZoom(
new BMap.Point(this.center_point[0], this.center_point[1]),
diff --git a/src/views/factor/index.vue b/src/views/factor/index.vue
index 0d1b9be..f447a11 100644
--- a/src/views/factor/index.vue
+++ b/src/views/factor/index.vue
@@ -11,6 +11,7 @@
:video_list="video_list"
:car_list="car_list"
:camera_list="camera_list"
+ :patrol_list="patrol_list"
@get_company_text="get_company_text"
@get_video_text="get_video_text"
@get_car_text="get_car_text"
@@ -62,6 +63,9 @@
{{
this.btn_camera
}}
+ {{
+ this.btn_patrol
+ }}
@@ -164,6 +168,7 @@ import {
car_point,
car_line,
camera_point,
+ patrol_point
} from "@/api/factorResources";
export default {
name: "factor",
@@ -176,6 +181,7 @@ export default {
video_list: [], // 七个区域所有监控单位
car_list: [], // 车辆点位
camera_list: [], // 感知设备点位
+ patrol_list:[], // 岗亭车
search: {
word: "",
select: "企业",
@@ -188,6 +194,7 @@ export default {
btn_item: "", // 复选框文字
btn_car: "", // 危化品车辆文字
btn_camera: "", // 感知设备文字
+ btn_patrol:'', // 岗亭车
company_flag: "0", // 公司详情框展示
/////////// 以下范围公司详情框所需对应变量声明
text_company: "",
@@ -213,10 +220,10 @@ export default {
},
created() {
this.get_list();
- // 默认地图打开展示视频监控
- this.get_video();
+ this.get_video(); // 默认地图打开展示视频监控
this.get_car_point();
this.get_camera_point();
+ this.get_patrol_point()
},
methods: {
// 七个区域所有的企业
@@ -229,14 +236,14 @@ export default {
});
},
// 展示所有点位
- get_all() {
- statistic().then((res) => {
- this.company_list = res.data.companyInfoList;
- this.video_list = res.data.deviceVideoInfoList;
- // 重新在地图打点
- this.$refs.factorMap.init_map();
- });
- },
+ // get_all() {
+ // statistic().then((res) => {
+ // this.company_list = res.data.companyInfoList;
+ // this.video_list = res.data.deviceVideoInfoList;
+ // // 重新在地图打点
+ // this.$refs.factorMap.init_map();
+ // });
+ // },
// 展示园区企业
get_item() {
this.company_flag = "0";
@@ -247,6 +254,8 @@ export default {
this.company_list = res.data;
this.video_list = [];
this.car_list = [];
+ this.patrol_list= [];
+ this.camera_list = [];
// 重新在地图打点
this.$refs.factorMap.init_map();
});
@@ -259,6 +268,7 @@ export default {
};
queryVideo(param).then((res) => {
this.video_list = res.data;
+ this.patrol_list= [];
this.camera_list = [];
this.company_list = [];
this.car_list = [];
@@ -273,6 +283,7 @@ export default {
console.log("resss", res);
if (res.code == 200) {
this.car_list = res.data;
+ this.patrol_list= [];
this.camera_list = [];
this.company_list = [];
this.video_list = [];
@@ -289,6 +300,23 @@ export default {
let res = await camera_point();
if (res.code == 200) {
this.camera_list = res.data;
+ this.patrol_list= [];
+ this.car_list = [];
+ this.company_list = [];
+ this.video_list = [];
+ // 重新在地图打点
+ this.$refs.factorMap.init_map();
+ } else if (res.code == 500) {
+ this.$message.warning(res.msg);
+ }
+ },
+ // 岗亭车
+ async get_patrol() {
+ this.company_flag = "0";
+ let res = await patrol_point()
+ if (res.code == 200) {
+ this.patrol_list = res.data;
+ this.camera_list = []
this.car_list = [];
this.company_list = [];
this.video_list = [];
@@ -394,6 +422,15 @@ export default {
this.$message.warning(res.msg);
}
},
+ async get_patrol_point() {
+ let res = await patrol_point()
+ if (res.code == 200) {
+ // this.car_list = res.data
+ this.btn_patrol = `岗亭车辆(${res.data.length})`;
+ } else if (res.code == 500) {
+ this.$message.warning(res.msg);
+ }
+ },
// 点击跳转企业档案详情页面
turn() {
sessionStorage.setItem("companyID", this.id);
@@ -527,7 +564,7 @@ export default {
}
.left_check {
width: 13vw;
- height: 23vh;
+ height: 27vh;
border: 0.1px solid #28847e;
background: #212f30;
border-radius: 4px;
@@ -546,7 +583,7 @@ export default {
margin-top: 1vh;
margin-left: 1vw;
width: 11vw;
- height: 18vh;
+ height: 22vh;
display: flex;
flex-direction: column;
.el-button {