企业大屏旧版部分背景图名中文名换成英文

pull/143/head
lukeyan 10 months ago
parent c9b61c2c6c
commit 04ed473a9c

@ -39,3 +39,11 @@ export function car_point(params) {
params params
}) })
} }
// 车辆轨迹
export function car_line(params) {
return request({
url:'/SafeCompanyVehicleTrack/getById',
method:'get',
params
})
}

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

@ -360,7 +360,7 @@ export default {
height: 34%; height: 34%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -307,7 +307,7 @@ export default {
height: 28.06%; height: 28.06%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -369,7 +369,7 @@ export default {
height: 36.42%; height: 36.42%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -454,7 +454,7 @@ export default {
.xfwp { .xfwp {
width: calc(33.33% - 13.33px); width: calc(33.33% - 13.33px);
height: 100%; height: 100%;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

@ -263,7 +263,7 @@ export default {
height: 25.64%; height: 25.64%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -243,7 +243,7 @@ export default {
height: calc(37.94% - 40px); height: calc(37.94% - 40px);
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -274,7 +274,7 @@ export default {
height: calc(37.94% - 40px); height: calc(37.94% - 40px);
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -219,7 +219,7 @@ export default {
.xfwp { .xfwp {
width: calc(33.33% - 13.33px); width: calc(33.33% - 13.33px);
height: 100%; height: 100%;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

@ -153,7 +153,7 @@ export default {
.xfwp { .xfwp {
width: calc(33.33% - 13.33px); width: calc(33.33% - 13.33px);
height: 100%; height: 100%;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

@ -96,11 +96,11 @@ export default {
); );
var car_marker = new BMap.Marker(car_point, { icon: car_icon }); // var car_marker = new BMap.Marker(car_point, { icon: car_icon }); //
map.addOverlay(car_marker); map.addOverlay(car_marker);
car_marker.addEventListener("click",function() { car_marker.addEventListener("click", function () {
// //
// //
that.$emit('get_car_text',item) that.$emit("get_car_text", item);
}) });
}); });
}, 500); }, 500);
map.centerAndZoom( map.centerAndZoom(
@ -198,7 +198,7 @@ export default {
} }
}, },
// //
cause_car_line_map(item) { cause_car_line_map(item, new_line) {
let BMap = window.BMap; let BMap = window.BMap;
let map = new BMap.Map("container", { let map = new BMap.Map("container", {
style: { style: {
@ -208,24 +208,36 @@ export default {
//let that = this; // //let that = this; //
//let label = new BMap.Label(); //let label = new BMap.Label();
setTimeout(() => { setTimeout(() => {
var point = new BMap.Point(item.longitude, item.latitude) var point = new BMap.Point(item.longitude, item.latitude);
// ; // ;
var myIcon = {}; var myIcon = {};
myIcon = new BMap.Icon( myIcon = new BMap.Icon(
require("@/assets/factor/factor03.png"), require("@/assets/factor/factor03.png"),
new BMap.Size(20, 40), new BMap.Size(20, 40),
{ {
imageOffset: new BMap.Size(0, 0, 5), // imageOffset: new BMap.Size(0, 0, 5), //
} }
);
var marker = new BMap.Marker(point, { icon: myIcon }); //
map.addOverlay(marker);
//
let line_point = [];
for (let i = 0; i < new_line.length; i++) {
line_point.push(
new BMap.Point(new_line[i].longitude, new_line[i].latitude)
); );
var marker = new BMap.Marker(point, { icon: myIcon }); // }
map.addOverlay(marker); console.log("line_point", line_point);
},500) let pl = new BMap.Polyline(line_point, {
strokeColor: "blue",
strokeWeight: 6,
strokeOpacity: 0.5,
});
console.log("pl", pl);
map.addOverlay(pl);
}, 500);
map.centerAndZoom( map.centerAndZoom(new BMap.Point(item.longitude, item.latitude), 16); //
new BMap.Point(item.longitude, item.latitude),
16
); //
map.setMinZoom(12); // map.setMinZoom(12); //
map.setMaxZoom(19); map.setMaxZoom(19);
map.enableScrollWheelZoom(true); map.enableScrollWheelZoom(true);

@ -158,6 +158,7 @@ import {
queryCompany, queryCompany,
queryVideo, queryVideo,
car_point, car_point,
car_line,
} from "@/api/factorResources"; } from "@/api/factorResources";
export default { export default {
name: "factor", name: "factor",
@ -168,7 +169,7 @@ export default {
return { return {
company_list: [], // company_list: [], //
video_list: [], // video_list: [], //
car_list:[], // car_list: [], //
search: { search: {
word: "", word: "",
select: "企业", select: "企业",
@ -179,7 +180,7 @@ export default {
], ],
btn_video: "", // btn_video: "", //
btn_item: "", // btn_item: "", //
btn_car:'', // btn_car: "", //
company_flag: "0", // company_flag: "0", //
/////////// ///////////
text_company: "", text_company: "",
@ -251,25 +252,25 @@ export default {
queryVideo(param).then((res) => { queryVideo(param).then((res) => {
this.video_list = res.data; this.video_list = res.data;
this.company_list = []; this.company_list = [];
this.car_list = [] this.car_list = [];
// //
this.$refs.factorMap.init_map(); this.$refs.factorMap.init_map();
}); });
}, },
// //
async get_car() { async get_car() {
this.company_flag = '0' this.company_flag = "0";
let res = await car_point(); let res = await car_point();
console.log("resss", res); console.log("resss", res);
if(res.code == 200) { if (res.code == 200) {
this.car_list = res.data this.car_list = res.data;
this.company_list = []; this.company_list = [];
this.video_list = [] this.video_list = [];
// //
this.$refs.factorMap.init_map(); this.$refs.factorMap.init_map();
// this.btn_car = `(${res.data.length})`; // this.btn_car = `(${res.data.length})`;
} else if (res.code == 500) { } 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) { async get_car_text(item) {
// let params = {
console.log('item',item); vehicleNo: item.vehicleNo,
this.$refs.factorMap.cause_car_line_map(item) };
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() { async get_car_point() {
let res = await car_point(); let res = await car_point();
console.log("resss", res); console.log("resss", res);
if(res.code == 200) { if (res.code == 200) {
// this.car_list = res.data // this.car_list = res.data
this.btn_car = `危化品车辆(${res.data.length})`; this.btn_car = `危化品车辆(${res.data.length})`;
} else if (res.code == 500) { } else if (res.code == 500) {
this.$message.warning(res.msg) this.$message.warning(res.msg);
} }
}, },
// //

@ -193,7 +193,7 @@ export default {
height: 23%; height: 23%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url("~@/assets/safetyIndex/主屏板块1.png") no-repeat; background: url("~@/assets/safetyIndex/modelback.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -335,7 +335,7 @@ export default {
height: 23%; height: 23%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url("~@/assets/safetyIndex/主屏板块1.png") no-repeat; background: url("~@/assets/safetyIndex/modelback.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -73,7 +73,7 @@ export default {
height: 22.9%; height: 22.9%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
@ -81,7 +81,7 @@ export default {
height: 37.56%; height: 37.56%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
} }

@ -133,7 +133,7 @@ export default {
height: 37.7%; height: 37.7%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;

@ -219,7 +219,7 @@ export default {
height: 37.7%; height: 37.7%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;

@ -511,7 +511,7 @@ export default {
height: 35.84%; height: 35.84%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url("~@/assets/safetyIndex/主屏板块1.png") no-repeat; background: url("~@/assets/safetyIndex/modelback.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

@ -87,7 +87,7 @@ export default {
height: 35.84%; height: 35.84%;
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat; background: url('~@/assets/safetyIndex/modelback.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {

Loading…
Cancel
Save