Commit b30ceef7 by 前端

v1.17.0版本需求

1 parent 8df86680
This diff could not be displayed because it is too large.
......@@ -3,12 +3,15 @@ import HTTP from '../config'
const axiosHttp = new HTTP()
function request (data = {} , url, method = 'GET') {
console.log('开始请求:',new Date().getTime())
return new Promise((resolve, reject) => {
var reqMethod = method.toLocaleLowerCase() === 'get' ? 'axiosGet' : 'axiosPost'
axiosHttp[reqMethod]({
url: url,
data: data,
success(data) {
console.log(data)
console.log('结束请求:',new Date().getTime())
resolve(data)
},
error(error) {
......

22.5 KB | W: | H:

7.02 KB | W: | H:

src/assets/images/car.png
src/assets/images/car.png
src/assets/images/car.png
src/assets/images/car.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -6,11 +6,21 @@
width: 88px;
height: 88px;
cursor: pointer;
.img {
img {
width: 100%;
height: 100%;
}
.img_hover{
display:none;
}
}
.row_box_hide:hover{
.img_normal{
display:none;
}
.img_hover{
display:block;
}
}
.row_box {
......@@ -99,6 +109,17 @@
}
}
.device_item{
display:flex;
align-items: center;
/deep/ .el-input__inner{
border-radius:4px 0 0 4px;
}
.btn{
border-radius:0 4px 4px 0;
}
}
.area_btn {
width: 88px;
height: 36px;
......
......@@ -61,17 +61,17 @@ export default {
console.log(e);
let list = this.cityList;
let nameList = [];
let id = 'fullname';
let m = list.find((k) => k.code == e[0]);
console.log(m);
nameList.push(m.name);
nameList.push(m[id]);
let n = m.children.find((k) => k.code == e[1]);
let b = ((n && n.children) || []).find((k) => k.code == e[2]);
if (n) {
this.$emit("input", n.name);
nameList.push(n.name);
this.$emit("input", n[id]);
nameList.push(n[id]);
}
if (b) {
nameList.push(b.name);
nameList.push(b[id]);
}
this.$emit("change", { code: e, name: nameList });
},
......
......@@ -22,6 +22,9 @@ var zhongliType = sessionStorage.getItem('zhongliType');//获取是否仲利账
MapService.prototype = {
init: function (id) {
var self = this;
if(self.map){
self.map.destroy()
}
var map = new AMap.Map(id, {
resizeEnable: true,
zoom: 11
......@@ -854,8 +857,27 @@ MapService.prototype = {
openPage(path) {
vue.prototype.$parentCommon.setBreadCrumbs(path);
window.open(path)
}
},
// 区域查车弹框
createAraeInfowindow(info){
let _div = `<h3 class="map-infowindow-title">${info.ownerName || '--'}/${info.vin || '--'}</h3>
<div class="map-infowindow-ct">
<p><i class="icon icon-info_device"></i> 设备号:<span class="des"> ${info.sn} (${info.isSource === '1' ? '有线' : '无线'})</span>
<span class="battery" data-battery style="display:${info.battery?'block':'none'}">
<i class="fill"><i class="fill-percentage" data-battery-percentage style="width:${info.battery}%;"></i></i>
<i class="icon icon-battery_enough"></i>
<i class="text" data-battery-text>${info.battery}</i>
</span></p>
</div>`;
var infoWindow = new AMap.InfoWindow({
offset: new AMap.Pixel(0, -20),
content: _div,
autoMove: true,
position:[info.lng,info.lat]
})
return infoWindow
},
}
......
......@@ -3,23 +3,30 @@ const MAPGEO = {
getGeocoder: function () {
return new Promise((resolve) => {
// 高德地图兼容方式,兼容低版本
if(AMap.service){
AMap.service('AMap.Geocoder', function () {//回调函数
var geocoder = new AMap.Geocoder({
batch: true
});
MAPGEO.geocoder = geocoder;
resolve(geocoder);
// if(AMap.service){
// AMap.service('AMap.Geocoder', function () {//回调函数
// var geocoder = new AMap.Geocoder({
// batch: true
// });
// MAPGEO.geocoder = geocoder;
// resolve(geocoder);
// });
// }else{
// AMap.plugin('AMap.Geocoder', function () {//回调函数
// var geocoder = new AMap.Geocoder({
// batch: true
// });
// MAPGEO.geocoder = geocoder;
// resolve(geocoder);
// });
// }
AMap.plugin('AMap.Geocoder', function () {//回调函数
var geocoder = new AMap.Geocoder({
batch: true
});
}else{
AMap.plugin('AMap.Geocoder', function () {//回调函数
var geocoder = new AMap.Geocoder({
batch: true
});
MAPGEO.geocoder = geocoder;
resolve(geocoder);
});
}
MAPGEO.geocoder = geocoder;
resolve(geocoder);
});
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!