企业列表新增位置地址显示
This commit is contained in:
parent
643e5ebdfc
commit
fe9fac27a4
@ -78,7 +78,7 @@ file:
|
||||
# 安全
|
||||
security:
|
||||
oauth2:
|
||||
oauth-server: http://127.0.0.1:7001/usercenter
|
||||
oauth-server: http://192.168.0.103:7001/usercenter
|
||||
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
||||
client:
|
||||
client-id: 44a8dc867f7f4465b7ba6065d87e30d7
|
||||
@ -129,4 +129,6 @@ access-control:
|
||||
logging:
|
||||
level:
|
||||
root: error
|
||||
com.cm: debug
|
||||
com.cm: debug
|
||||
|
||||
notice-url: http://192.168.0.103:7001/usercenter
|
@ -0,0 +1,66 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div id="baiduMap" style="width: 100%; height: 436px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=f6GW67DsG2Q8neoailgV7aGObleUGX1N"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var enterpriseId = top.restAjax.params(window.location.href).enterpriseId;
|
||||
var lng = top.restAjax.params(window.location.href).lng;
|
||||
var lat = top.restAjax.params(window.location.href).lat;
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var map = new BMap.Map('baiduMap');
|
||||
map.enableScrollWheelZoom();
|
||||
map.enableContinuousZoom();
|
||||
map.addControl(new BMap.NavigationControl());
|
||||
map.addControl(new BMap.ScaleControl());
|
||||
map.addControl(new BMap.OverviewMapControl());
|
||||
map.addControl(new BMap.MapTypeControl({
|
||||
type: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
|
||||
mapTypes: [BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP]
|
||||
}));
|
||||
|
||||
var point = new BMap.Point(lng, lat);
|
||||
map.centerAndZoom(point, 15);
|
||||
|
||||
var marker = new BMap.Marker(point);
|
||||
map.addOverlay(marker);
|
||||
}
|
||||
initData();
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -281,6 +281,11 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var lng = row.enterpriseLng;
|
||||
var lat = row.enterpriseLat;
|
||||
if(lng && lat) {
|
||||
return '<i class="fa fa-location-arrow"> <a href="javascript:void(0);" data-lng="'+ lng +'" data-lat="'+ lat +'" lay-event="locationEvent">'+ rowData +'</a></i>';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
@ -493,6 +498,17 @@
|
||||
height: '80%',
|
||||
onClose: function() {}
|
||||
});
|
||||
} else if(event === 'locationEvent') {
|
||||
var positions = this.dataset;
|
||||
var lng = positions.lng;
|
||||
var lat = positions.lat;
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/enterprise/get-enterprise-location.html?enterpriseId={enterpriseId}&lng={lng}&lat={lat}', [data.enterpriseId, lng, lat]),
|
||||
title: '【'+ data.name +'】的位置',
|
||||
width: '600px',
|
||||
height: '500px',
|
||||
onClose: function() {}
|
||||
});
|
||||
}
|
||||
});
|
||||
// 联动事件
|
||||
|
@ -281,6 +281,11 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var lng = row.enterpriseLng;
|
||||
var lat = row.enterpriseLat;
|
||||
if(lng && lat) {
|
||||
return '<i class="fa fa-location-arrow"> <a href="javascript:void(0);" data-lng="'+ lng +'" data-lat="'+ lat +'" lay-event="locationEvent">'+ rowData +'</a></i>';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
@ -509,6 +514,17 @@
|
||||
height: '80%',
|
||||
onClose: function() {}
|
||||
});
|
||||
} else if(event === 'locationEvent') {
|
||||
var positions = this.dataset;
|
||||
var lng = positions.lng;
|
||||
var lat = positions.lat;
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/enterprise/get-enterprise-location.html?enterpriseId={enterpriseId}&lng={lng}&lat={lat}', [data.enterpriseId, lng, lat]),
|
||||
title: '【'+ data.name +'】的位置',
|
||||
width: '600px',
|
||||
height: '500px',
|
||||
onClose: function() {}
|
||||
});
|
||||
}
|
||||
});
|
||||
// 联动事件
|
||||
|
Loading…
Reference in New Issue
Block a user