Commit 458b003a authored by 黄奎's avatar 黄奎

页面修改

parent 3843b22f
......@@ -47,13 +47,7 @@
props: ["PostConfig", "ConfigId"],
data() {
return {
layerIds: [],
sourceIds: [],
setLoading: false,
imageUrl: "",
deviceMarkers: [],
loadingCity: false,
loading: false,
TripColor: "",
NationList: [],
searchNation: {
......@@ -387,9 +381,9 @@
var postJson = {
ConfigId: this.ConfigId
};
this.imageUrl = this.map.getCanvas().toDataURL("image/png");
let mapCanvas = document.querySelector(".mapboxgl-canvas");
html2Canvas(document.getElementById("trip_map")).then(function (canvas) {
var trip_map_obj = document.getElementById("trip_map");
console.log("trip_map_obj",trip_map_obj);
html2Canvas(trip_map_obj).then(function (canvas) {
var image = document.createElement("a");
image.href = canvas.toDataURL("image/png");
let blob = that.base64ToBlob(image.href);
......@@ -415,12 +409,11 @@
},
// 获取国家
async getAddress(Type) {
this.loading = true;
await this.apipost(
"dict_get_Destination_GetCityExtList",
this.searchNation,
res => {
this.loading = false;
if (Type == 1) {
this.NationList = res.data.data;
this.NationList.forEach(x => {
......@@ -430,7 +423,6 @@
this.TripMapList.forEach(x => {
x.NationList = res.data.data;
});
this.$forceUpdate();
}
},
err => {}
......@@ -521,13 +513,13 @@
}
});
}
this.loadingCity = true;
this.apipost(
"dict_get_Destination_GetCountryCityList", {
QCountry: MId
},
res => {
this.loadingCity = false;
this.CityList = res.data.data;
this.CityList.forEach(x => {
x.ID = Number(x.ID);
......
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