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

页面修改

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