|
@@ -355,6 +355,13 @@
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="地图" name="fifth">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="mapdate"
|
|
|
+ style="width: 200px;margin-bottom:10px;"
|
|
|
+ type="date"
|
|
|
+ size="small"
|
|
|
+ placeholder="选择日期">
|
|
|
+ </el-date-picker>
|
|
|
<div id="map" style="width:100%; height: 700px;"></div>
|
|
|
</el-tab-pane>
|
|
|
<!-- <el-tab-pane label="会务数据统计" name="third">会务数据统计</el-tab-pane> -->
|
|
@@ -449,6 +456,8 @@ export default {
|
|
|
input:'',
|
|
|
map:null,
|
|
|
//
|
|
|
+ mapdate:'',
|
|
|
+ mapinput:'',
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -498,7 +507,6 @@ export default {
|
|
|
if (this.activeName=='fifth') {
|
|
|
// this.getonline();
|
|
|
}
|
|
|
- // console.log(tab, event);
|
|
|
},
|
|
|
//处理时间
|
|
|
getdate(val){
|
|
@@ -603,13 +611,15 @@ export default {
|
|
|
series: [{ type: 'bar' }]
|
|
|
},true);
|
|
|
},
|
|
|
- //在线引入
|
|
|
- getonline(){
|
|
|
- // const oScript = document.createElement('script');
|
|
|
- // oScript.type = 'text/javascript';
|
|
|
- // oScript.src = 'https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.core.js';
|
|
|
- // document.body.appendChild(oScript);
|
|
|
- // this.onlinemap();
|
|
|
+ //地址转换
|
|
|
+ getonline(val){
|
|
|
+ var geocoder = new mapkit.Geocoder({
|
|
|
+ language: "zh-Hans",
|
|
|
+ getsUserLocation: true
|
|
|
+ });
|
|
|
+ geocoder.lookup(val, function (err, data) {
|
|
|
+ return data
|
|
|
+ });
|
|
|
},
|
|
|
//在线地图
|
|
|
async onlinemap(){
|
|
@@ -621,41 +631,12 @@ export default {
|
|
|
done(token);
|
|
|
},
|
|
|
});
|
|
|
- mapkit.addEventListener("configuration-change", function(event) {
|
|
|
- switch (event.status) {
|
|
|
- case "Initialized":
|
|
|
- console.log('dasd');
|
|
|
-
|
|
|
- // MapKit JS initializes and configures.
|
|
|
- break;
|
|
|
- case "Refreshed":
|
|
|
- console.log('das222d');
|
|
|
- // The MapKit JS configuration updates.
|
|
|
- break;
|
|
|
- }
|
|
|
- });
|
|
|
- // mapkit.load({
|
|
|
- // libraries: ['services'],
|
|
|
- // // 这里可以包含授权回调函数
|
|
|
- // authorizationCallback: function (done, error) {
|
|
|
- // // 你的授权逻辑
|
|
|
- // }
|
|
|
- // }).then(function () {
|
|
|
- // // 库加载完成后的代码
|
|
|
- // }).catch(function (error) {
|
|
|
- // // 错误处理
|
|
|
- // });
|
|
|
- // var geocoder = new mapkit.Geocoder();
|
|
|
-
|
|
|
- var geocoder = new mapkit.Geocoder({
|
|
|
- language: "zh-Hans",
|
|
|
- getsUserLocation: true
|
|
|
- });
|
|
|
- geocoder.lookup('中国四川省达州市', function (err, data) {
|
|
|
- console.log(err);
|
|
|
-
|
|
|
- console.log(data);
|
|
|
- });
|
|
|
+ console.log(this.getonline('구의3동 587 동서울우편물류센터 4층'));
|
|
|
+ console.log(this.getonline('1061 Haupapa St, Private Bag 3029, Rotorua Mail Centre, Rotorua 3046, New Zealand'));
|
|
|
+ console.log(this.getonline('Av. Río San Joaquín 498-piso 2, suite 5, Amp Granada, Miguel Hidalgo, 11529 Ciudad de México, CDMX, 墨西哥'));
|
|
|
+ console.log(this.getonline('MQGH+RF 中央区 日本东京都'));
|
|
|
+
|
|
|
+
|
|
|
var CALLOUT_OFFSET = new DOMPoint(-148, -78);
|
|
|
var landmarkAnnotationCallout = {
|
|
|
calloutElementForAnnotation: function(annotation) {
|
|
@@ -674,11 +655,9 @@ export default {
|
|
|
a.textContent = "website";
|
|
|
return div;
|
|
|
},
|
|
|
-
|
|
|
calloutAnchorOffsetForAnnotation: function(annotation, element) {
|
|
|
return CALLOUT_OFFSET;
|
|
|
},
|
|
|
-
|
|
|
calloutAppearanceAnimationForAnnotation: function(annotation) {
|
|
|
return ".4s cubic-bezier(0.4, 0, 0, 1.5) 0s 1 normal scale-and-fadein";
|
|
|
}
|
|
@@ -692,8 +671,6 @@ export default {
|
|
|
{ coordinate: new mapkit.Coordinate(37.779267, -122.419269), title: "City Hall", phone: "+1 (415) 701-2311", url: "http://sfgsa.org/index.aspx?page=1085" },
|
|
|
{ coordinate: new mapkit.Coordinate(37.8184493, -122.478409), title: "Golden Gate Bridge", phone: "+1 (415) 921-5858", url: "http://www.goldengatebridge.org" },
|
|
|
{ coordinate: new mapkit.Coordinate(37.7785538, -122.514035), title: "Cliff House", phone: "+1 (415) 386-3330", url: "http://www.cliffhouse.com/" },
|
|
|
- // { locality:"成都", title: "成都", phone: "+1 (415) 983-8030", url: "http://www.ferrybuildingmarketplace.com" },
|
|
|
- // { coordinate: new mapkit.Geocoder("成都"), title: "成都", phone: "+1 (415) 983-8030", url: "http://www.ferrybuildingmarketplace.com" }
|
|
|
];
|
|
|
var annotations = sanFranciscoLandmarks.map(function(landmark) {
|
|
|
var annotation = new mapkit.MarkerAnnotation(landmark.coordinate, {
|
|
@@ -703,17 +680,8 @@ export default {
|
|
|
annotation.landmark = landmark;
|
|
|
return annotation;
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
this.map = new mapkit.Map("map");
|
|
|
this.map.showItems(annotations);
|
|
|
-
|
|
|
- // this.map = new mapkit.Map("map", {
|
|
|
- // center: new mapkit.Coordinate(104.096488, 30.635261),
|
|
|
- // showsMapTypeControl: true,
|
|
|
- // showsZoomControl: true,
|
|
|
- // });
|
|
|
-
|
|
|
},
|
|
|
|
|
|
//团组酒店
|
|
@@ -843,8 +811,6 @@ export default {
|
|
|
tooltip: {
|
|
|
formatter:function(params){
|
|
|
var html=params.data[0]+":"+params.data[1]+"次<br/>关联团组:<br/>";
|
|
|
- console.log(params);
|
|
|
-
|
|
|
for(let i=0;i<params.data[2].length;i++){
|
|
|
html += params.data[2][i]+"<br/>";
|
|
|
}
|