Commit 202ba035 authored by 黄奎's avatar 黄奎
parents 7b2e370f 9f0bb087
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
id="thirdAnchor" @featureCallBack="getFeature" :FeatureData="FeatureData" :TeamType="TeamType" id="thirdAnchor" @featureCallBack="getFeature" :FeatureData="FeatureData" :TeamType="TeamType"
:isNewConfig="isNewConfig" @unlockFormCommit="unlockFormCommit" :CurrentUserInfo="CurrentUserInfo"> :isNewConfig="isNewConfig" @unlockFormCommit="unlockFormCommit" :CurrentUserInfo="CurrentUserInfo">
</TravelFeature> </TravelFeature>
<Tripmap :dataAll="PostConfig"></Tripmap> <Tripmap :dataAll="PostConfig" :ConfigId="ConfigId"></Tripmap>
<TravelNotice :class="{'showOther':TeamType==3}" ref="TravelNotice" id="fourAnchor" @headCallBack="getNotice" <TravelNotice :class="{'showOther':TeamType==3}" ref="TravelNotice" id="fourAnchor" @headCallBack="getNotice"
:subArray="NoticeParameters" :NoticeData="NoticeData" v-bind:PostConfig="PostConfig" :subArray="NoticeParameters" :NoticeData="NoticeData" v-bind:PostConfig="PostConfig"
v-bind:AllCityList="AllCityList" v-bind:CountryID="PostConfig.CountryID"></TravelNotice> v-bind:AllCityList="AllCityList" v-bind:CountryID="PostConfig.CountryID"></TravelNotice>
......
...@@ -60,7 +60,7 @@ import worldGeoJSON from "../../../utils/geojson.json"; ...@@ -60,7 +60,7 @@ import worldGeoJSON from "../../../utils/geojson.json";
mapboxgl.accessToken = mapboxgl.accessToken =
"pk.eyJ1IjoiYWxleDkwMTIiLCJhIjoiY2xtOGw4NHdkMGFndTNjcnFkeWZncGc2dyJ9.lVrAdPHE0Dg5zoWFidfj4Q"; "pk.eyJ1IjoiYWxleDkwMTIiLCJhIjoiY2xtOGw4NHdkMGFndTNjcnFkeWZncGc2dyJ9.lVrAdPHE0Dg5zoWFidfj4Q";
export default { export default {
props: ["dataAll"], props: ["dataAll","ConfigId"],
data() { data() {
return { return {
deviceMarkers: [], deviceMarkers: [],
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
{ name: "米哈斯", longitude: -4.637519, latitude: 36.595747 }, { name: "米哈斯", longitude: -4.637519, latitude: 36.595747 },
{ name: "格拉纳达", longitude: -3.599534, latitude: 37.1735 } { name: "格拉纳达", longitude: -3.599534, latitude: 37.1735 }
], ],
TripMapList: null TripMapList: []
}; };
}, },
watch: { watch: {
...@@ -125,7 +125,8 @@ export default { ...@@ -125,7 +125,8 @@ export default {
}, },
dataAll: { dataAll: {
handler(val, oldVal) { handler(val, oldVal) {
this.getAddress(1); // console.log(val,'-------')
if(this.NationList.length==0) this.getAddress(1);
// console.log(val.TripCountryList,'TripCountryList====',val.TripCitwlist,'----------') // console.log(val.TripCountryList,'TripCountryList====',val.TripCitwlist,'----------')
// let arrList = function(list){ // let arrList = function(list){
// list.forEach(x=>{ // list.forEach(x=>{
...@@ -134,6 +135,8 @@ export default { ...@@ -134,6 +135,8 @@ export default {
// x.CityListIds = [] // x.CityListIds = []
// }) // })
// } // }
if(val.TripMapList.length>0){
this.TripMapList = JSON.parse(JSON.stringify(val.TripMapList)) this.TripMapList = JSON.parse(JSON.stringify(val.TripMapList))
// arrList(this.TripMapList) // arrList(this.TripMapList)
let listCity = []; let listCity = [];
...@@ -156,6 +159,7 @@ export default { ...@@ -156,6 +159,7 @@ export default {
this.SearchCity(x.MId) this.SearchCity(x.MId)
} }
}) })
}
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -163,7 +167,33 @@ export default { ...@@ -163,7 +167,33 @@ export default {
}, },
computed: {}, computed: {},
mounted() { mounted() {
if(this.dataAll.TripMapList.length==0){
let obj = {
CityList: [],
CityListAll: [],
CityListIds: [],
NationList: this.NationList,
ColorStr: this.dataAll.TripColor?this.dataAll.TripColor:'#409eff',
ConfigId: this.ConfigId,
Id: 0,
MId: null,
MName: null,
MType: 1,
MapLevel: 0,
MapUrl:"",
ParentId: null,
PositionStr:{
Bottom: 0,
Left: 0,
Right: 0,
Top: 0,
}
}
this.TripMapList.push(JSON.parse(JSON.stringify(obj)))
}
this.initializeData() this.initializeData()
}, },
methods: { methods: {
// 更新数据 // 更新数据
...@@ -189,10 +219,18 @@ export default { ...@@ -189,10 +219,18 @@ export default {
} }
}) })
this.countriesData.forEach((x, i) => { this.countriesData.forEach((x, i) => {
if(this.map.getLayer('world-layer-'+i)) { if(this.map&&this.map.getLayer('world-layer-'+i)) {
this.map.removeLayer('world-layer-'+i) this.map.removeLayer('world-layer-'+i)
} }
}) })
let poilines = this.pois.split(",");
poilines.forEach((p, i) => {
if (i < poilines.length - 1) {
this.map.removeLayer('curve-layer-'+i)
this.map.removeSource('curve-source-'+i)
}
})
if (this.pois&&this.pois!=''&&this.citys&&this.citys.length>0 if (this.pois&&this.pois!=''&&this.citys&&this.citys.length>0
&& this.countriesData &&this.countriesData.length > 0&&this.TripMapList.length==this.countriesData.length) { && this.countriesData &&this.countriesData.length > 0&&this.TripMapList.length==this.countriesData.length) {
...@@ -392,6 +430,9 @@ export default { ...@@ -392,6 +430,9 @@ export default {
}, },
addCountryFillRange() { addCountryFillRange() {
this.countriesData.forEach((x, i) => { this.countriesData.forEach((x, i) => {
if(x.MName=='中国'){
x.MName = '中华人民共和国'
}
this.map.addLayer({ this.map.addLayer({
id: "world-layer-" + i, id: "world-layer-" + i,
type: "fill", type: "fill",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment