|
@@ -460,7 +460,42 @@ export default {
|
|
|
mapdate:'',
|
|
|
mapinput:'',
|
|
|
mapdata:[
|
|
|
-
|
|
|
+ {
|
|
|
+ groupName: "信息部测试专用赴日本、加拿大7日",
|
|
|
+ client: "信息部测试专用",
|
|
|
+ statusText: "入住酒店中",
|
|
|
+ address: "上海"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ groupName: "信息部测试专用加拿大7日",
|
|
|
+ client: "信息部测试专用",
|
|
|
+ statusText: "商务会议中",
|
|
|
+ address: "北京"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ groupName: "信息部测试专用赴日本7日",
|
|
|
+ client: "信息部测试专用",
|
|
|
+ statusText: "参加会展",
|
|
|
+ address: "日本〒104-0032 Tokyo, Chuo City, Hatchobori, 1 Chome−12−8 EAST2階"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ groupName: "信息部测试专用赴墨西哥",
|
|
|
+ client: "信息部测试专用",
|
|
|
+ statusText: "入住酒店中",
|
|
|
+ address: "Av. Río San Joaquín 498-piso 2, suite 5, Amp Granada, Miguel Hidalgo, 11529 Ciudad de México, CDMX, 墨西哥"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ groupName: "信息部测试专用赴韩国",
|
|
|
+ client: "信息部测试专用",
|
|
|
+ statusText: "入住酒店中",
|
|
|
+ address: "成都"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ groupName: "信息部测试专用赴日本东京都",
|
|
|
+ client: "信息部测试专用",
|
|
|
+ statusText: "入住酒店中",
|
|
|
+ address: "加拿大"
|
|
|
+ },
|
|
|
],
|
|
|
fordata:[],
|
|
|
}
|
|
@@ -639,6 +674,7 @@ export default {
|
|
|
let cityinif=res.data.data;
|
|
|
let aa=''
|
|
|
for(let i=0;i<cityinif.length;i++){
|
|
|
+ console.log(cityinif[i].address);
|
|
|
aa=''
|
|
|
cityinif[i].items.map((item)=>{
|
|
|
return aa += item.groupName+" "+item.client+" "+"("+item.statusText+")<br/>";
|
|
@@ -648,6 +684,7 @@ export default {
|
|
|
{'groupName':aa,'address':cityinif[i].address}
|
|
|
)
|
|
|
that.mapdata=mapdatas;
|
|
|
+ console.log(that.mapdata);
|
|
|
}
|
|
|
}else{
|
|
|
that.$message({
|
|
@@ -700,7 +737,7 @@ export default {
|
|
|
that.fordata=[];
|
|
|
for (let i = 0; i < this.mapdata.length; i++) {
|
|
|
var listinif={}
|
|
|
- geocoder.lookup(this.mapdata[i].address, function (err, data) {
|
|
|
+ geocoder.lookup(this.mapdata[i].address==''?'中国':this.mapdata[i].address, function (err, data) {
|
|
|
if (err) {
|
|
|
console.log(err);
|
|
|
}else{
|
|
@@ -728,18 +765,19 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
console.log(nonnull);
|
|
|
- let sanFranciscoLandmarks=[];
|
|
|
- for (let k = 0; k < nonnull.length; k++) {
|
|
|
- sanFranciscoLandmarks.push(
|
|
|
- {
|
|
|
- 'coordinate':new mapkit.Coordinate(Number(nonnull[k].latitude),Number(nonnull[k].longitude)),
|
|
|
- 'title':nonnull[k].country+' '+nonnull[k].administrativeArea+' '+nonnull[k].locality,
|
|
|
- 'phone':nonnull[k].groupName,
|
|
|
- 'url':nonnull[k].url,
|
|
|
- }
|
|
|
- )
|
|
|
-
|
|
|
- }
|
|
|
+
|
|
|
+ let sanFranciscoLandmarks=[];
|
|
|
+ for (let k = 0; k < nonnull.length; k++) {
|
|
|
+ sanFranciscoLandmarks.push(
|
|
|
+ {
|
|
|
+ 'coordinate':new mapkit.Coordinate(Number(nonnull[k].latitude),Number(nonnull[k].longitude)),
|
|
|
+ 'title':nonnull[k].country+' '+nonnull[k].administrativeArea+' '+nonnull[k].locality,
|
|
|
+ 'phone':nonnull[k].groupName,
|
|
|
+ 'url':nonnull[k].url,
|
|
|
+ }
|
|
|
+ )
|
|
|
+
|
|
|
+ }
|
|
|
var annotations = sanFranciscoLandmarks.map(function (landmark) {
|
|
|
var annotation = new mapkit.MarkerAnnotation(landmark.coordinate, {
|
|
|
callout: landmarkAnnotationCallout,
|