mixdashboards 1.1.64 → 1.1.65

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.
@@ -133737,17 +133737,30 @@ ${p}`;
133737
133737
  };
133738
133738
  return _ ? (I.yAxis.data = g.items, v.realSort && (I.yAxis.inverse = v.sortType === "desc"), I.xAxis.splitLine.lineStyle.type = "dashed", m && y > 0 && (I.xAxis.max = 100, I.xAxis.axisLabel.formatter = (P) => `${P}%`)) : (I.xAxis.data = g.items, delete I.xAxis.max, v.realSort && (I.xAxis.inverse = v.sortType === "asc"), I.yAxis.splitLine.lineStyle.type = "dashed", delete I.yAxis.type, m && y > 0 && (I.yAxis.max = 100, I.yAxis.axisLabel.formatter = (P) => `${P}%`)), I;
133739
133739
  }
133740
+ setHistoryData(p) {
133741
+ if (!Array.isArray(p) || !p.length) return;
133742
+ const { data: v } = this.props.conf;
133743
+ !Array.isArray(v) || !v.length || (v.forEach((g, m) => {
133744
+ var _;
133745
+ const b = Array.isArray((_ = p[m]) == null ? void 0 : _.data) ? p[m].data : [];
133746
+ let y = null;
133747
+ for (let S = b.length - 1; S >= 0 && (y = this.parseNumericRaw(b[S]), y === null); S--)
133748
+ ;
133749
+ this.CHART.rawValues[m] = y != null ? y : "--";
133750
+ }), this.updateChart(this.getChartOption()));
133751
+ }
133740
133752
  setSocketData(p) {
133741
- if (!this.hasData() || !p || !this.chartObj) return;
133753
+ if (!this.hasData() || !p) return;
133742
133754
  const { data: v } = this.props.conf;
133743
- this.CHART.rawValues = [], v.forEach((m) => {
133744
- const b = this.extractDataValue(p, m.fv);
133745
- this.CHART.rawValues.push(b != null ? b : "--");
133746
- });
133747
- const { seriesData: g } = this.buildSeriesAndMax();
133748
- this.chartObj.setOption({
133749
- series: [{ data: g }]
133750
- });
133755
+ let g = !1;
133756
+ if (v.forEach((m, b) => {
133757
+ if (!this.shouldApplyRealtimeToItem(p, m)) return;
133758
+ const y = this.extractDataValue(p, m.fv, m);
133759
+ y != null && (this.CHART.rawValues[b] = y, g = !0);
133760
+ }), g) {
133761
+ const { seriesData: m } = this.buildSeriesAndMax();
133762
+ this.updateChart({ series: [{ data: m }] });
133763
+ }
133751
133764
  }
133752
133765
  }
133753
133766
  const a = new r(e, "raceBar");
@@ -133802,7 +133815,7 @@ ${p}`;
133802
133815
  an(h.$slots, "default", {}, void 0, !0)
133803
133816
  ], 4));
133804
133817
  }
133805
- })), e2t = /* @__PURE__ */ Xt($ht, [["__scopeId", "data-v-92f0aff9"]]), t2t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
133818
+ })), e2t = /* @__PURE__ */ Xt($ht, [["__scopeId", "data-v-7cf57ee1"]]), t2t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
133806
133819
  __proto__: null,
133807
133820
  default: e2t
133808
133821
  }, Symbol.toStringTag, { value: "Module" })), n2t = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='14'%20width='4'%20height='7'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='7'%20y='14'%20width='4'%20height='7'%20rx='1'%20fill='currentColor'/%3e%3crect%20x='11'%20y='8'%20width='4'%20height='13'%20rx='1'%20fill='currentColor'%20opacity='0.5'/%3e%3crect%20x='15'%20y='8'%20width='4'%20height='13'%20rx='1'%20fill='currentColor'/%3e%3c/svg%3e", i2t = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='3'%20y='14'%20width='4'%20height='7'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='7'%20y='14'%20width='4'%20height='7'%20rx='1'%20fill='%23FFFFFF'/%3e%3crect%20x='11'%20y='8'%20width='4'%20height='13'%20rx='1'%20fill='%23FFFFFF'%20opacity='0.5'/%3e%3crect%20x='15'%20y='8'%20width='4'%20height='13'%20rx='1'%20fill='%23FFFFFF'/%3e%3c/svg%3e", r2t = { class: "mix-body" }, a2t = ["id"], o2t = {
@@ -135210,18 +135223,20 @@ ${v}`;
135210
135223
  const c = () => Be(null, null, function* () {
135211
135224
  const { data: v } = e.conf;
135212
135225
  s.value = [];
135213
- const g = v.filter((S) => S.project_id).map((S) => S.project_id);
135226
+ const g = v.filter((x) => x.project_id).map((x) => x.project_id);
135214
135227
  if (!g.length) return;
135215
- const m = ++l, b = {
135228
+ const m = new Map(
135229
+ v.filter((x) => x.project_id && x.object_id).map((x) => [x.project_id, x.object_id])
135230
+ ), b = ++l, y = {
135216
135231
  where_in: JSON.stringify([["uid", g.join(",")]])
135217
- }, { result: y } = yield nn.http("get_collect_list", b);
135218
- if (m !== l) return;
135219
- const _ = y == null ? void 0 : y.data;
135220
- Array.isArray(_) && _.length > 0 && (s.value = _.map((S) => ({
135221
- name: S.name,
135222
- uid: S.uid,
135223
- object_id: S.object_id,
135224
- data: u(S.script)
135232
+ }, { result: _ } = yield nn.http("get_collect_list", y);
135233
+ if (b !== l) return;
135234
+ const S = _ == null ? void 0 : _.data;
135235
+ Array.isArray(S) && S.length > 0 && (s.value = S.map((x) => ({
135236
+ name: x.name,
135237
+ uid: x.uid,
135238
+ object_id: m.get(x.uid) || x.object_id,
135239
+ data: u(x.script)
135225
135240
  })));
135226
135241
  }), u = (v) => {
135227
135242
  const g = [];
@@ -135396,7 +135411,7 @@ ${v}`;
135396
135411
  ], 4);
135397
135412
  };
135398
135413
  }
135399
- })), Upt = /* @__PURE__ */ Xt(Vpt, [["__scopeId", "data-v-58df742e"]]), Hpt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
135414
+ })), Upt = /* @__PURE__ */ Xt(Vpt, [["__scopeId", "data-v-b7a09e9c"]]), Hpt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
135400
135415
  __proto__: null,
135401
135416
  default: Upt
135402
135417
  }, Symbol.toStringTag, { value: "Module" })), jpt = { class: "item-val" }, Gpt = {
@@ -160839,7 +160854,7 @@ K2([8, 32946], () => import("./deflate-DZSox_Tz.js").then((n) => n.default));
160839
160854
  K2(32773, () => import("./packbits-AaardaO4.js").then((n) => n.default));
160840
160855
  K2(
160841
160856
  34887,
160842
- () => import("./lerc-DuArhr4I.js").then((n) => Be(null, null, function* () {
160857
+ () => import("./lerc-s2welNpC.js").then((n) => Be(null, null, function* () {
160843
160858
  return yield n.zstd.init(), n;
160844
160859
  })).then((n) => n.default)
160845
160860
  );
@@ -175697,7 +175712,7 @@ ${f}`;
175697
175712
  w();
175698
175713
  }, k.loopRate * 1e3));
175699
175714
  }), S = (P) => Be(null, null, function* () {
175700
- const k = ["uid", "name", "customer_name", "mapping_name", "model", "tag", "province", "city", "description", "created"], { common: D, options: N } = i.conf, F = ze({
175715
+ const k = ["uid", "name", "customer_id", "mapping_id", "model", "tag", "province", "city", "description", "created"], { common: D, options: N } = i.conf, F = ze({
175701
175716
  page_index: u.current,
175702
175717
  page_size: 9999
175703
175718
  }, i.uid ? { where_and: JSON.stringify([[D.gridType === "object" ? "uid" : "object_id", "=", i.uid]]) } : {});
@@ -175830,7 +175845,7 @@ ${f}`;
175830
175845
  ], 4);
175831
175846
  };
175832
175847
  }
175833
- })), Czt = /* @__PURE__ */ Xt(Azt, [["__scopeId", "data-v-cbdb5900"]]), Tzt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
175848
+ })), Czt = /* @__PURE__ */ Xt(Azt, [["__scopeId", "data-v-db3dcb1a"]]), Tzt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
175834
175849
  __proto__: null,
175835
175850
  default: Czt
175836
175851
  }, Symbol.toStringTag, { value: "Module" })), Ezt = { class: "mix-body" }, Mzt = { class: "w-full flex flex-col" }, Lzt = { key: 2 }, Dzt = {
@@ -235190,7 +235205,7 @@ const zpn = ["data-theme"], Bpn = ["id", "data-theme"], Vpn = ["src"], Upn = ["d
235190
235205
  } : void 0
235191
235206
  ]), 1032, ["script", "uid", "mixiot-dashboard-uid", "enableWebSocket", "follow-host-theme", "is-product", "agent", "release-embed-agent-on-unmount"]));
235192
235207
  }
235193
- }), Gpn = "1.1.64";
235208
+ }), Gpn = "1.1.65";
235194
235209
  typeof console != "undefined" && console.info && console.info("[MixDashboards] 版本:", Gpn);
235195
235210
  const Ypn = [vC, y5, O3], Wpn = function(n) {
235196
235211
  Ypn.forEach((e) => {