super-page-runtime 2.2.89 → 2.2.91-sit1

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.
@@ -3,84 +3,84 @@ import { hiprint as t, disAutoConnect as n } from "vue-plugin-hiprint";
3
3
  import { generateCodeByRule as o } from "../barcode-util.js";
4
4
  function a(n2, a2) {
5
5
  e.post(window.$vueApp.config.globalProperties.baseAPI + "/dc/print-models/by-codes", [a2]).then((e2) => {
6
- const a3 = JSON.parse(e2[0].template), i2 = [];
6
+ const a3 = JSON.parse(e2[0].template), l2 = [];
7
7
  a3.panels.forEach((e3) => {
8
8
  e3.printElements.forEach((e4) => {
9
- "barcode" !== e4.options.textType && "qrcode" !== e4.options.textType || i2.push(e4.options);
9
+ "barcode" !== e4.options.textType && "qrcode" !== e4.options.textType || l2.push(e4.options);
10
10
  });
11
11
  });
12
- const l = new t.PrintTemplate({ template: a3 }), r = { callback: () => {
12
+ const i = new t.PrintTemplate({ template: a3 }), r = { callback: () => {
13
13
  }, styleHandler: () => "" }, c = { leftOffset: -1, topOffset: -1 };
14
- n2.pageContext.pageType ? "list" === n2.pageContext.pageType ? function(e3, t2, n3, a4, s2) {
14
+ n2.pageContext.pageType ? "list" === n2.pageContext.pageType ? function(e3, t2, n3, a4, p2) {
15
15
  if (t2.length > 0) {
16
- const i3 = [], l2 = JSON.parse(JSON.stringify(e3.selections));
16
+ const l3 = [], i2 = JSON.parse(JSON.stringify(e3.selections));
17
17
  t2.forEach((e4) => {
18
- i3.push(function(e5, t3) {
18
+ l3.push(function(e5, t3) {
19
19
  return new Promise((n4, a5) => {
20
- const s3 = e5.field.split("."), i4 = [];
21
- s3.length < 2 && n4([]);
20
+ const p3 = e5.field.split("."), l4 = [];
21
+ p3.length < 2 && n4([]);
22
22
  try {
23
- p(s3[1]).then((e6) => {
23
+ s(p3[1]).then((e6) => {
24
24
  t3.forEach((t4, n5) => {
25
- const a6 = { type: s3[0], name: s3[1], value: null, index: n5 };
26
- a6.value = o(JSON.parse(e6.barcodeModelItems), t4), i4.push(a6);
27
- }), n4(i4);
25
+ const a6 = { type: p3[0], name: p3[1], value: null, index: n5 };
26
+ a6.value = o(JSON.parse(e6.barcodeModelItems), t4), l4.push(a6);
27
+ }), n4(l4);
28
28
  });
29
29
  } catch (e6) {
30
30
  n4([]);
31
31
  }
32
32
  });
33
- }(e4, l2));
34
- }), Promise.all(i3).then((e4) => {
33
+ }(e4, i2));
34
+ }), Promise.all(l3).then((e4) => {
35
35
  e4.forEach((e5) => {
36
36
  e5.forEach((e6) => {
37
- const t3 = e6.index, n4 = l2[t3];
37
+ const t3 = e6.index, n4 = i2[t3];
38
38
  n4[e6.type] || (n4[e6.type] = {}), n4[e6.type][e6.name] = e6.value;
39
39
  });
40
- }), n3.print(l2, a4, s2);
40
+ }), n3.print(i2, a4, p2);
41
41
  });
42
- } else n3.print(e3.selections, a4, s2);
43
- }(n2, i2, l, c, r) : "form" === n2.pageContext.pageType && s(n2, i2, l, c, r) : s(n2, i2, l, c, r);
42
+ } else n3.print(e3.selections, a4, p2);
43
+ }(n2, l2, i, c, r) : "form" === n2.pageContext.pageType && p(n2, l2, i, c, r) : p(n2, l2, i, c, r);
44
44
  });
45
45
  }
46
- function s(e2, t2, n2, a2, s2) {
46
+ function p(e2, t2, n2, a2, p2) {
47
47
  if (t2.length > 0) {
48
- const i2 = [];
48
+ const l2 = [];
49
49
  t2.forEach((t3) => {
50
- i2.push(function(e3, t4) {
50
+ l2.push(function(e3, t4) {
51
51
  return new Promise((n3, a3) => {
52
- const s3 = t4.field.split("."), i3 = { type: null, name: null, value: null };
53
- s3.length < 2 && n3(i3), i3.type = s3[0], i3.name = s3[1];
52
+ const p3 = t4.field.split("."), l3 = { type: null, name: null, value: null };
53
+ p3.length < 2 && n3(l3), l3.type = p3[0], l3.name = p3[1];
54
54
  try {
55
- p(i3.name).then((t5) => {
55
+ s(l3.name).then((t5) => {
56
56
  const a4 = JSON.parse(t5.barcodeModelItems);
57
- i3.value = o(a4, e3.entity.data), n3(i3);
57
+ l3.value = o(a4, e3.entity.data), n3(l3);
58
58
  });
59
59
  } catch (e4) {
60
- n3(i3);
60
+ n3(l3);
61
61
  }
62
62
  });
63
63
  }(e2.pageContext, t3));
64
- }), Promise.all(i2).then((t3) => {
64
+ }), Promise.all(l2).then((t3) => {
65
65
  const o2 = {};
66
66
  t3.forEach((e3) => {
67
67
  e3.type && e3.name && e3.value && (o2[e3.type] || (o2[e3.type] = {}), o2[e3.type][e3.name] = e3.value);
68
68
  });
69
- const p2 = {};
70
- Object.assign(p2, e2.pageContext.entity, o2), n2.print(p2, a2, s2);
69
+ const s2 = { table: {} };
70
+ Object.assign(s2, e2.pageContext.entity, o2), s2.table = e2.pageContext.entity.data, n2.print(s2, a2, p2);
71
71
  });
72
72
  } else {
73
- const t3 = {};
74
- Object.assign(t3, e2.pageContext.entity), n2.print(t3, a2, s2);
73
+ const t3 = { table: {} };
74
+ Object.assign(t3, e2.pageContext.entity), t3.table = e2.pageContext.entity.data, n2.print(t3, a2, p2);
75
75
  }
76
76
  }
77
- function p(t2) {
77
+ function s(t2) {
78
78
  const n2 = encodeURIComponent(t2);
79
79
  return e.get(window.$vueApp.config.globalProperties.baseAPI + `/dc/setting-barcode-models/by-name?name=${n2}`);
80
80
  }
81
81
  n();
82
- const i = { printLabel: a };
82
+ const l = { printLabel: a };
83
83
  export {
84
- i as default,
84
+ l as default,
85
85
  a as printLabel
86
86
  };