|
|
|
@ -158,6 +158,7 @@ import {
|
|
|
|
|
queryCompany,
|
|
|
|
|
queryVideo,
|
|
|
|
|
car_point,
|
|
|
|
|
car_line,
|
|
|
|
|
} from "@/api/factorResources";
|
|
|
|
|
export default {
|
|
|
|
|
name: "factor",
|
|
|
|
@ -168,7 +169,7 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
company_list: [], // 七个区域所有的企业
|
|
|
|
|
video_list: [], // 七个区域所有监控单位
|
|
|
|
|
car_list:[], // 车辆点位
|
|
|
|
|
car_list: [], // 车辆点位
|
|
|
|
|
search: {
|
|
|
|
|
word: "",
|
|
|
|
|
select: "企业",
|
|
|
|
@ -179,7 +180,7 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
btn_video: "", // 复选框文字
|
|
|
|
|
btn_item: "", // 复选框文字
|
|
|
|
|
btn_car:'', // 危化品车辆文字
|
|
|
|
|
btn_car: "", // 危化品车辆文字
|
|
|
|
|
company_flag: "0", // 公司详情框展示
|
|
|
|
|
/////////// 以下范围公司详情框所需对应变量声明
|
|
|
|
|
text_company: "",
|
|
|
|
@ -251,25 +252,25 @@ export default {
|
|
|
|
|
queryVideo(param).then((res) => {
|
|
|
|
|
this.video_list = res.data;
|
|
|
|
|
this.company_list = [];
|
|
|
|
|
this.car_list = []
|
|
|
|
|
this.car_list = [];
|
|
|
|
|
// 重新在地图打点
|
|
|
|
|
this.$refs.factorMap.init_map();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 展示危化品车辆点位
|
|
|
|
|
async get_car() {
|
|
|
|
|
this.company_flag = '0'
|
|
|
|
|
this.company_flag = "0";
|
|
|
|
|
let res = await car_point();
|
|
|
|
|
console.log("resss", res);
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
this.car_list = res.data
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.car_list = res.data;
|
|
|
|
|
this.company_list = [];
|
|
|
|
|
this.video_list = []
|
|
|
|
|
// 重新在地图打点
|
|
|
|
|
this.video_list = [];
|
|
|
|
|
// 重新在地图打点
|
|
|
|
|
this.$refs.factorMap.init_map();
|
|
|
|
|
// this.btn_car = `危化品车辆(${res.data.length})`;
|
|
|
|
|
} else if (res.code == 500) {
|
|
|
|
|
this.$message.warning(res.msg)
|
|
|
|
|
this.$message.warning(res.msg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 查询企业
|
|
|
|
@ -323,20 +324,35 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 查看危化品车辆轨迹
|
|
|
|
|
get_car_text(item) {
|
|
|
|
|
// 查看轨迹的点击事件是要重新创建地图的,以该车坐标为中心
|
|
|
|
|
console.log('item',item);
|
|
|
|
|
this.$refs.factorMap.cause_car_line_map(item)
|
|
|
|
|
async get_car_text(item) {
|
|
|
|
|
let params = {
|
|
|
|
|
vehicleNo: item.vehicleNo,
|
|
|
|
|
};
|
|
|
|
|
let res = await car_line(params);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
console.log("res", res);
|
|
|
|
|
let arr = [
|
|
|
|
|
{ longitude: 121.597849, latitude: 29.904037 },
|
|
|
|
|
{ longitude: 121.597864, latitude: 29.904234 },
|
|
|
|
|
];
|
|
|
|
|
const new_line = arr.map((item) => ({
|
|
|
|
|
longitude: item.longitude,
|
|
|
|
|
latitude: item.latitude,
|
|
|
|
|
}));
|
|
|
|
|
this.$message.success("车辆轨迹查询中...");
|
|
|
|
|
// 查看轨迹的点击事件是要重新创建地图的,以该车坐标为中心
|
|
|
|
|
this.$refs.factorMap.cause_car_line_map(item, new_line);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async get_car_point() {
|
|
|
|
|
let res = await car_point();
|
|
|
|
|
console.log("resss", res);
|
|
|
|
|
if(res.code == 200) {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
// this.car_list = res.data
|
|
|
|
|
this.btn_car = `危化品车辆(${res.data.length})`;
|
|
|
|
|
} else if (res.code == 500) {
|
|
|
|
|
this.$message.warning(res.msg)
|
|
|
|
|
this.$message.warning(res.msg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 点击跳转企业档案详情页面
|
|
|
|
|