mixapply 1.1.5-4.1 → 1.1.5-4.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.
package/mixapply.js CHANGED
@@ -57504,63 +57504,46 @@ const O1 = (t, e, r) => {
57504
57504
  },
57505
57505
  setup(t) {
57506
57506
  const e = t, r = q({}), n = () => {
57507
- var p, g, v, m, b, y, S, C;
57508
- const { conf: f } = e;
57507
+ var g, v, m, b, y, S, C, _;
57508
+ const { conf: p } = e;
57509
57509
  r.value = {
57510
- bgColor: ((g = (p = f == null ? void 0 : f.options) == null ? void 0 : p.bgColor) == null ? void 0 : g.value) || "#fff",
57511
- textColor: ((m = (v = f == null ? void 0 : f.options) == null ? void 0 : v.textColor) == null ? void 0 : m.value) || "#111",
57512
- textSize: ((y = (b = f == null ? void 0 : f.options) == null ? void 0 : b.textSize) == null ? void 0 : y.value) || 16,
57513
- radiusSize: ((C = (S = f == null ? void 0 : f.options) == null ? void 0 : S.radiusSize) == null ? void 0 : C.value) ?? 4
57510
+ bgColor: ((v = (g = p == null ? void 0 : p.options) == null ? void 0 : g.bgColor) == null ? void 0 : v.value) || "#fff",
57511
+ textColor: ((b = (m = p == null ? void 0 : p.options) == null ? void 0 : m.textColor) == null ? void 0 : b.value) || "#111",
57512
+ textSize: ((S = (y = p == null ? void 0 : p.options) == null ? void 0 : y.textSize) == null ? void 0 : S.value) || 16,
57513
+ radiusSize: ((_ = (C = p == null ? void 0 : p.options) == null ? void 0 : C.radiusSize) == null ? void 0 : _.value) ?? 4
57514
57514
  };
57515
57515
  }, a = () => {
57516
57516
  window.close();
57517
57517
  }, i = async () => {
57518
- const { options: f } = e.conf;
57519
- let p = f.jumpParam.value;
57520
- if (p) {
57521
- let g = f.jumpType.value === "url" ? p : await o({ uid: p });
57522
- if (g.startsWith("mixui/#/") || g.startsWith("/mixui/#/")) {
57523
- let b = g.split("mixui/#/")[1];
57524
- g = `${window.location.origin}/mixui/#/${b}`;
57525
- }
57526
- console.log(g, "url");
57527
- const v = window.location.pathname + window.location.hash.split("?")[0], m = g.split("?")[0];
57528
- if (v === m) {
57529
- const b = g + (g.includes("?") ? "&" : "?") + "_t=" + Date.now();
57530
- window.location.href = b, setTimeout(() => {
57531
- window.location.reload(!0);
57532
- }, 100);
57533
- } else {
57534
- try {
57535
- const b = new URL(g), C = b.hash.substring(1).split("/").map((_) => {
57536
- try {
57537
- const w = decodeURIComponent(_);
57538
- return encodeURIComponent(w);
57539
- } catch {
57540
- return encodeURIComponent(_);
57541
- }
57542
- }).join("/");
57543
- b.hash = C, g = b.toString();
57544
- } catch (b) {
57545
- console.warn("URL解析失败,使用原始URL", b);
57546
- }
57547
- window.location.href = g;
57518
+ const { options: p } = e.conf;
57519
+ let g = p.jumpParam.value;
57520
+ if (g) {
57521
+ let v = p.jumpType.value === "url" ? g : await s({ uid: g });
57522
+ if (v.startsWith("mixui/#/") || v.startsWith("/mixui/#/")) {
57523
+ let m = v.split("mixui/#/")[1];
57524
+ v = `${window.location.origin}/mixui/#/${m}`;
57548
57525
  }
57526
+ o(v);
57549
57527
  } else {
57550
57528
  $1.error("未设置跳转参数");
57551
57529
  return;
57552
57530
  }
57553
- }, o = async (f) => {
57554
- var v;
57555
- const { result: p } = await Tt.post("get_object_item", { uid: f.uid }, !0);
57556
- let g = {};
57557
- if ((v = p.dashboard_list) != null && v.length && (g = p.dashboard_list.find((m) => m.type === "show")), Object.keys(g).length)
57558
- return `${location.origin}/mixui/#/preview/${g.uid}/${g.name}?object_id=${f.uid}`;
57531
+ };
57532
+ function o(p) {
57533
+ const g = new URL(window.location.href), v = new URL(p, window.location.origin), m = v.pathname.includes("mixui") && v.hash.startsWith("#/"), b = g.host !== v.host, y = g.pathname !== v.pathname, S = g.search !== v.search;
57534
+ b || y || S ? location.href = p : !b && !y && !S && m ? window.location.hash = v.hash : location.href = p;
57535
+ }
57536
+ const s = async (p) => {
57537
+ var m;
57538
+ const { result: g } = await Tt.post("get_object_item", { uid: p.uid }, !0);
57539
+ let v = {};
57540
+ if ((m = g.dashboard_list) != null && m.length && (v = g.dashboard_list.find((b) => b.type === "show")), Object.keys(v).length)
57541
+ return `${location.origin}/mixui/#/preview/${v.uid}/${v.name}?object_id=${p.uid}`;
57559
57542
  $1({
57560
57543
  message: "该对象未配置大屏脚本",
57561
57544
  type: "warning"
57562
57545
  });
57563
- }, c = {
57546
+ }, d = {
57564
57547
  close: a,
57565
57548
  jump: i,
57566
57549
  back: () => {
@@ -57574,20 +57557,20 @@ const O1 = (t, e, r) => {
57574
57557
  full: () => {
57575
57558
  document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
57576
57559
  }
57577
- }, d = () => {
57578
- const { options: f } = e.conf;
57579
- e.mode === "preview" && c[f.category.value]();
57580
- }, h = It(n, 200);
57560
+ }, h = () => {
57561
+ const { options: p } = e.conf;
57562
+ e.mode === "preview" && d[p.category.value]();
57563
+ }, f = It(n, 200);
57581
57564
  return be(
57582
57565
  () => e.conf,
57583
57566
  () => {
57584
- e.mode === "edit" && h();
57567
+ e.mode === "edit" && f();
57585
57568
  },
57586
57569
  { deep: !0 }
57587
57570
  ), Ve(() => {
57588
57571
  n();
57589
- }), (f, p) => {
57590
- var g, v, m, b, y, S;
57572
+ }), (p, g) => {
57573
+ var v, m, b, y, S, C;
57591
57574
  return H(), Y("div", J7e, [
57592
57575
  G("div", {
57593
57576
  class: "btn-wrap",
@@ -57596,15 +57579,15 @@ const O1 = (t, e, r) => {
57596
57579
  color: r.value.textColor,
57597
57580
  borderRadius: `${r.value.radiusSize}px`,
57598
57581
  fontSize: `${r.value.textSize}px`,
57599
- backgroundImage: `url(${(m = (v = (g = t.conf) == null ? void 0 : g.options) == null ? void 0 : v.bgImg) == null ? void 0 : m.value})`
57582
+ backgroundImage: `url(${(b = (m = (v = t.conf) == null ? void 0 : v.options) == null ? void 0 : m.bgImg) == null ? void 0 : b.value})`
57600
57583
  }),
57601
- onClick: d
57602
- }, ue(((S = (y = (b = t.conf) == null ? void 0 : b.options) == null ? void 0 : y.name) == null ? void 0 : S.value) || ""), 5),
57603
- xe(f.$slots, "default", {}, void 0, !0)
57584
+ onClick: h
57585
+ }, ue(((C = (S = (y = t.conf) == null ? void 0 : y.options) == null ? void 0 : S.name) == null ? void 0 : C.value) || ""), 5),
57586
+ xe(p.$slots, "default", {}, void 0, !0)
57604
57587
  ]);
57605
57588
  };
57606
57589
  }
57607
- }), nce = /* @__PURE__ */ gt(rce, [["__scopeId", "data-v-34c9fb05"]]), Wg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
57590
+ }), nce = /* @__PURE__ */ gt(rce, [["__scopeId", "data-v-3202ef88"]]), Wg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
57608
57591
  __proto__: null,
57609
57592
  default: nce
57610
57593
  }, Symbol.toStringTag, { value: "Module" })), ace = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", ice = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", oce = { class: "w-full h-full flex" }, sce = {