@idmwx/idmui-report 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,7 @@ declare namespace _sfc_main {
29
29
  }
30
30
  const emits: string[];
31
31
  function data(): {
32
+ loading: boolean;
32
33
  tropicals: undefined;
33
34
  activeForecast: undefined;
34
35
  timeSubscript: string[];
@@ -60,6 +61,10 @@ declare namespace _sfc_main {
60
61
  };
61
62
  }
62
63
  const watch: {
64
+ model: {
65
+ handler(): void;
66
+ immediate: boolean;
67
+ };
63
68
  'report.id': {
64
69
  handler(): void;
65
70
  immediate: boolean;
package/dist/index.js CHANGED
@@ -10897,6 +10897,7 @@ const JB = {
10897
10897
  emits: ["center"],
10898
10898
  data() {
10899
10899
  return {
10900
+ loading: !1,
10900
10901
  tropicals: void 0,
10901
10902
  activeForecast: void 0,
10902
10903
  timeSubscript: ["0", "6", "12", "18", "24", "36", "48", "72"],
@@ -10976,10 +10977,17 @@ const JB = {
10976
10977
  }
10977
10978
  },
10978
10979
  watch: {
10980
+ model: {
10981
+ handler() {
10982
+ var s;
10983
+ (s = this.report) != null && s.id && !this.loading && this.prepare();
10984
+ },
10985
+ immediate: !0
10986
+ },
10979
10987
  "report.id": {
10980
10988
  handler() {
10981
10989
  var s;
10982
- (s = this.report) != null && s.id && this.prepare();
10990
+ (s = this.report) != null && s.id && !this.loading && this.prepare();
10983
10991
  },
10984
10992
  immediate: !0
10985
10993
  }
@@ -10987,6 +10995,7 @@ const JB = {
10987
10995
  methods: {
10988
10996
  async prepare() {
10989
10997
  var l, v, r, _, w, A, f, g, O, p, E, F;
10998
+ this.loading = !0;
10990
10999
  const s = QB.convert2Geojson([this.report]);
10991
11000
  this.model && s.features.forEach((W) => {
10992
11001
  W.properties.type === "forecast" && W.properties.model !== this.model && (W.properties.disabled = !0);
@@ -11009,7 +11018,7 @@ const JB = {
11009
11018
  B.pressure > 1e4 && (B.pressure = Lo.roundPrecision(B.pressure / 100, 0)), B.hour = Number(W), B.date = u.clone().add(B.hour, "h").utc().format("MMM-DD/HH[Z]"), this.activeForecast.sample.push(B), i++;
11010
11019
  } else
11011
11020
  break;
11012
- this.records = await this.interpolatedRecord(this.activeForecast.date, this.activeForecast.hours, 1), this.fetchData().then();
11021
+ this.records = await this.interpolatedRecord(this.activeForecast.date, this.activeForecast.hours, 1), this.fetchData().then(), this.loading = !1;
11013
11022
  },
11014
11023
  async fetchData() {
11015
11024
  var w;
@@ -11215,7 +11224,7 @@ const JB = {
11215
11224
  return v;
11216
11225
  }
11217
11226
  }
11218
- }, pn = (s) => (re("data-v-391af4fc"), s = s(), ue(), s), KB = { class: "typhoon-report" }, qB = { class: "report-content" }, XB = { class: "map" }, jB = { class: "table" }, tL = /* @__PURE__ */ pn(() => /* @__PURE__ */ t("thead", null, [
11227
+ }, pn = (s) => (re("data-v-7c3e83cd"), s = s(), ue(), s), KB = { class: "typhoon-report" }, qB = { class: "report-content" }, XB = { class: "map" }, jB = { class: "table" }, tL = /* @__PURE__ */ pn(() => /* @__PURE__ */ t("thead", null, [
11219
11228
  /* @__PURE__ */ t("tr", null, [
11220
11229
  /* @__PURE__ */ t("td", null, "Time"),
11221
11230
  /* @__PURE__ */ t("td", null, "Position"),
@@ -11290,7 +11299,7 @@ function sL(s, a, o, u, i, l) {
11290
11299
  eL
11291
11300
  ]);
11292
11301
  }
11293
- const oL = /* @__PURE__ */ Lt(JB, [["render", sL], ["__scopeId", "data-v-391af4fc"]]), Rst = {
11302
+ const oL = /* @__PURE__ */ Lt(JB, [["render", sL], ["__scopeId", "data-v-7c3e83cd"]]), Rst = {
11294
11303
  install(s) {
11295
11304
  s.component("TropicalReport", oL);
11296
11305
  }