super-page-runtime 2.3.7 → 2.3.9-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.
Files changed (57) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +50 -50
  2. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +102 -102
  3. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +26 -24
  4. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +59 -58
  5. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +38 -37
  6. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +28 -27
  7. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
  8. package/dist/es/components/runtime/utils/charts/chart-util.js +29 -22
  9. package/dist/es/components/runtime/utils/common-util.d.ts +4 -0
  10. package/dist/es/components/runtime/utils/common-util.js +4 -0
  11. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  12. package/dist/es/components/runtime/utils/events/print-label.js +25 -26
  13. package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
  14. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  15. package/dist/es/components/runtime/utils/events/validator-util.js +122 -104
  16. package/dist/es/components/runtime/utils/page-init-util.js +24 -25
  17. package/dist/es/components/runtime/utils/page-store.js +10 -10
  18. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +4 -1
  20. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +4 -4
  21. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  22. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
  23. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +4 -1
  24. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +15 -15
  25. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +4 -1
  26. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +7 -7
  27. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +4 -1
  28. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +8 -8
  29. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +4 -1
  30. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +7 -7
  31. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +11 -12
  32. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
  33. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
  34. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  35. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +19 -17
  36. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +26 -20
  37. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +10 -4
  38. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +31 -28
  39. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +32 -25
  40. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +52 -49
  41. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -30
  42. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +38 -35
  43. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +18 -15
  44. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -55
  45. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
  46. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
  47. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
  48. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +55 -53
  49. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +63 -61
  50. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +25 -22
  51. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +16 -13
  52. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  53. package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
  54. package/dist/es/components/runtime/views/super-page.vue2.js +11 -12
  55. package/dist/es/style.css +30 -0
  56. package/package.json +2 -2
  57. package/dist/es.zip +0 -0
@@ -1,80 +1,81 @@
1
1
  import { getValueFromSource as o, setValueForVariableName as t } from "../page-helper-util.js";
2
2
  import { deepCopy as r } from "../common-util.js";
3
- import { CommonName as s, caculateFormulaValue as e, executeChartFormula as l, sortDatas as n, limitDatas as p } from "./chart-util.js";
4
- function i(i2, u, c, a) {
5
- if (!a || !a.result) return;
6
- const f = a && a.result ? a.result : {};
7
- let g = a && a.groupValue ? a.groupValue : void 0;
8
- const m = u.serviceDataField;
9
- let h = null;
10
- m ? h = f[m] : f && (h = Array.isArray(f) ? f : [f]), h || (h = []);
11
- let d = u.props ? u.props.groups : null;
12
- if (d || (d = []), !g || 0 === g.length) {
13
- g = [];
14
- for (const o2 of d) g.push(o2.group);
3
+ import { setDefaultGrid as s, CommonName as e, caculateFormulaValue as l, executeChartFormula as n, sortDatas as p, limitDatas as i } from "./chart-util.js";
4
+ function u(u2, c, a, f) {
5
+ if (!f || !f.result) return;
6
+ s(a);
7
+ const g = f && f.result ? f.result : {};
8
+ let m = f && f.groupValue ? f.groupValue : void 0;
9
+ const h = c.serviceDataField;
10
+ let d = null;
11
+ h ? d = g[h] : g && (d = Array.isArray(g) ? g : [g]), d || (d = []);
12
+ let y = c.props ? c.props.groups : null;
13
+ if (y || (y = []), !m || 0 === m.length) {
14
+ m = [];
15
+ for (const o2 of y) m.push(o2.group);
15
16
  }
16
- const y = {}, x = [], v = [];
17
- for (const o2 of d) y[o2.group] = o2.target, o2.target && !x.includes(o2.target) && (x.push(o2.target), g.includes(o2.group) && v.push(o2.target));
18
- let E = u.props ? u.props.mulGroupShow : "";
19
- E = "break" == E ? "\r\n" : " ";
20
- for (const t2 of h) {
17
+ const x = {}, v = [], E = [];
18
+ for (const o2 of y) x[o2.group] = o2.target, o2.target && !v.includes(o2.target) && (v.push(o2.target), m.includes(o2.group) && E.push(o2.target));
19
+ let F = c.props ? c.props.mulGroupShow : "";
20
+ F = "break" == F ? "\r\n" : " ";
21
+ for (const t2 of d) {
21
22
  if (!t2) continue;
22
23
  const r2 = [];
23
- for (const s2 of g) {
24
- const e3 = y[s2], l2 = o(t2, e3, void 0);
24
+ for (const s3 of m) {
25
+ const e2 = x[s3], l2 = o(t2, e2, void 0);
25
26
  l2 && r2.push(l2);
26
27
  }
27
- const e2 = r2.join(E);
28
- t2[s.X_FIELD_NAME] = e2;
28
+ const s2 = r2.join(F);
29
+ t2[e.X_FIELD_NAME] = s2;
29
30
  }
30
- const F = u.items ? u.items : [];
31
- if (0 == F.length) return;
32
- const S = u.props ? u.props : {};
33
- let _ = S.yaxisField;
34
- if (F[0].props.yaxisField = _, F[0].props.yaxisSource = S.yaxisSource, F[0].props.formula = S.formula, "formula" === S.yaxisSource) {
35
- const t2 = [], r2 = e(F, h, t2);
36
- let n2 = S.formula ? S.formula : "";
37
- for (const o2 in r2) n2 = n2.replace(new RegExp(o2.replace("$", "\\$"), "g"), r2[o2]);
38
- _ = s.Y_TEMP_NAME;
31
+ const S = c.items ? c.items : [];
32
+ if (0 == S.length) return;
33
+ const _ = c.props ? c.props : {};
34
+ let A = _.yaxisField;
35
+ if (S[0].props.yaxisField = A, S[0].props.yaxisSource = _.yaxisSource, S[0].props.formula = _.formula, "formula" === _.yaxisSource) {
36
+ const t2 = [], r2 = l(S, d, t2);
37
+ let s2 = _.formula ? _.formula : "";
38
+ for (const o2 in r2) s2 = s2.replace(new RegExp(o2.replace("$", "\\$"), "g"), r2[o2]);
39
+ A = e.Y_TEMP_NAME;
39
40
  const p2 = {};
40
- for (const r3 of h) {
41
+ for (const r3 of d) {
41
42
  if (!r3) continue;
42
43
  for (const s3 of t2) {
43
44
  const t3 = o(r3, s3, void 0);
44
- let e2 = p2[s3];
45
- void 0 === t3 || isNaN(t3) || (void 0 === e2 ? e2 = t3 : e2 += t3), p2[s3] = e2;
45
+ let e3 = p2[s3];
46
+ void 0 === t3 || isNaN(t3) || (void 0 === e3 ? e3 = t3 : e3 += t3), p2[s3] = e3;
46
47
  }
47
- const s2 = l(n2, p2, r3, i2);
48
- r3[_] = s2;
48
+ const e2 = n(s2, p2, r3, u2);
49
+ r3[A] = e2;
49
50
  }
50
51
  }
51
- F[0].props.yaxisField = _, F[0].props.yaxisSource = "", n(i2, u, h), h = p(i2, u, h, x, [_]);
52
- const A = [], D = [];
53
- for (const t2 of h) {
52
+ S[0].props.yaxisField = A, S[0].props.yaxisSource = "", p(u2, c, d), d = i(u2, c, d, v, [A]);
53
+ const D = [], M = [];
54
+ for (const t2 of d) {
54
55
  if (!t2) continue;
55
- A.push(t2[s.X_FIELD_NAME]);
56
- const r2 = o(t2, _, void 0);
57
- D.push(r2);
56
+ D.push(t2[e.X_FIELD_NAME]);
57
+ const r2 = o(t2, A, void 0);
58
+ M.push(r2);
58
59
  }
59
- const M = u.defaultSeries;
60
- let N = M[0].pieColors;
61
- N = N || [];
62
- let j = M[0].pieColorMap;
63
- j = j || {};
64
- const b = [];
65
- for (let o2 = 0; o2 < A.length && o2 < D.length; o2++) {
66
- const t2 = { value: D[o2], name: A[o2] };
67
- if (o2 < N.length || j[t2.name]) {
68
- let r2 = j[t2.name];
69
- r2 || (r2 = N[o2]), r2 && (t2.itemStyle = { color: r2 });
60
+ const N = c.defaultSeries;
61
+ let j = N[0].pieColors;
62
+ j = j || [];
63
+ let b = N[0].pieColorMap;
64
+ b = b || {};
65
+ const w = [];
66
+ for (let o2 = 0; o2 < D.length && o2 < M.length; o2++) {
67
+ const t2 = { value: M[o2], name: D[o2] };
68
+ if (o2 < j.length || b[t2.name]) {
69
+ let r2 = b[t2.name];
70
+ r2 || (r2 = j[o2]), r2 && (t2.itemStyle = { color: r2 });
70
71
  }
71
- b.push(t2);
72
+ w.push(t2);
72
73
  }
73
- const w = r(M);
74
- w[0].data = b, c.series = [w[0]];
75
- const I = u.props ? u.props.selGroupVariable : null;
76
- !(u.props ? u.props.enableDrill : null) && I && (u.highlightInfos = [], t(i2.entity, I, null)), u.groupFields = v, u.cacheDatas = h, u.rawResult = a;
74
+ const I = r(N);
75
+ I[0].data = w, a.series = [I[0]];
76
+ const V = c.props ? c.props.selGroupVariable : null;
77
+ !(c.props ? c.props.enableDrill : null) && V && (c.highlightInfos = [], t(u2.entity, V, null)), c.groupFields = E, c.cacheDatas = d, c.rawResult = f;
77
78
  }
78
79
  export {
79
- i as updateChartOption
80
+ u as updateChartOption
80
81
  };
@@ -1,54 +1,55 @@
1
1
  import { getValueFromSource as e } from "../page-helper-util.js";
2
2
  import { deepCopy as o } from "../common-util.js";
3
- import { caculateFormulaValue as i, executeChartFormula as t } from "./chart-util.js";
4
- function a(a2, s, r, l) {
5
- if (!l || !l.result) return;
6
- const u = l && l.result ? l.result : {}, f = s.serviceDataField;
7
- let d = null;
8
- f ? d = u[f] : u && (d = Array.isArray(u) ? u : [u]), d || (d = []);
9
- const n = s.items ? s.items : [], c = [], p = {}, m = [], x = i(n, d, m);
10
- for (const e2 of n) {
3
+ import { setDefaultGrid as i, caculateFormulaValue as t, executeChartFormula as a } from "./chart-util.js";
4
+ function s(s2, r, l, u) {
5
+ if (!u || !u.result) return;
6
+ i(l);
7
+ const f = u && u.result ? u.result : {}, d = r.serviceDataField;
8
+ let n = null;
9
+ d ? n = f[d] : f && (n = Array.isArray(f) ? f : [f]), n || (n = []);
10
+ const c = r.items ? r.items : [], p = [], m = {}, x = [], v = t(c, n, x);
11
+ for (const e2 of c) {
11
12
  const o2 = e2.props ? e2.props : {}, i2 = o2.yaxisSource, t2 = o2.yaxisField;
12
- let a3 = null;
13
+ let a2 = null;
13
14
  if (!t2 || i2 && "variable" != i2) if ("formula" == i2) {
14
15
  let i3 = o2.formula ? o2.formula : "";
15
- for (const e3 in x) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), x[e3]);
16
- a3 = { uuid: e2.uuid, type: "formula", formula: i3, data: [] };
17
- } else a3 = { uuid: e2.uuid, type: "fixed", field: o2.yaxisFix, data: [] };
18
- else a3 = { uuid: e2.uuid, type: "variable", field: t2, data: [] };
19
- a3 && (c.push(a3), p[a3.uuid] = a3);
16
+ for (const e3 in v) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), v[e3]);
17
+ a2 = { uuid: e2.uuid, type: "formula", formula: i3, data: [] };
18
+ } else a2 = { uuid: e2.uuid, type: "fixed", field: o2.yaxisFix, data: [] };
19
+ else a2 = { uuid: e2.uuid, type: "variable", field: t2, data: [] };
20
+ a2 && (p.push(a2), m[a2.uuid] = a2);
20
21
  }
21
- const v = s.props ? s.props : {}, y = v.nameField, h = v.maxSource, F = v.maxField, b = v.maxFixed, g = [], j = {};
22
- for (const o2 of d) {
22
+ const y = r.props ? r.props : {}, h = y.nameField, F = y.maxSource, b = y.maxField, g = y.maxFixed, j = [], S = {};
23
+ for (const o2 of n) {
23
24
  if (!o2) continue;
24
- const i2 = e(o2, y, void 0);
25
- let s2 = null;
26
- s2 = h && "variable" != h ? b : e(o2, F, void 0), g.push({ text: i2, max: s2 });
27
- for (const i3 of m) {
28
- const t2 = e(o2, i3, void 0);
29
- let a3 = j[i3];
30
- void 0 === t2 || isNaN(t2) || (void 0 === a3 ? a3 = t2 : a3 += t2), j[i3] = a3;
25
+ const i2 = e(o2, h, void 0);
26
+ let t2 = null;
27
+ t2 = F && "variable" != F ? g : e(o2, b, void 0), j.push({ text: i2, max: t2 });
28
+ for (const i3 of x) {
29
+ const t3 = e(o2, i3, void 0);
30
+ let a2 = S[i3];
31
+ void 0 === t3 || isNaN(t3) || (void 0 === a2 ? a2 = t3 : a2 += t3), S[i3] = a2;
31
32
  }
32
- for (const i3 of c) {
33
- const s3 = i3.data;
34
- if ("fixed" == i3.type) s3.push(i3.field);
33
+ for (const i3 of p) {
34
+ const t3 = i3.data;
35
+ if ("fixed" == i3.type) t3.push(i3.field);
35
36
  else if ("variable" == i3.type) {
36
- const t2 = e(o2, i3.field, void 0);
37
- s3.push(t2);
37
+ const a2 = e(o2, i3.field, void 0);
38
+ t3.push(a2);
38
39
  } else if ("formula" == i3.type) {
39
- const e2 = t(i3.formula, j, o2, a2);
40
- s3.push(e2);
41
- } else s3.push(void 0);
40
+ const e2 = a(i3.formula, S, o2, s2);
41
+ t3.push(e2);
42
+ } else t3.push(void 0);
42
43
  }
43
44
  }
44
- r.radar[0].indicator = g;
45
- const S = s.defaultSeries, w = o(S), A = w[0].data;
46
- for (const e2 of A) {
47
- const o2 = p[e2.uuid];
45
+ l.radar[0].indicator = j;
46
+ const w = r.defaultSeries, A = o(w), D = A[0].data;
47
+ for (const e2 of D) {
48
+ const o2 = m[e2.uuid];
48
49
  e2.value = o2.data;
49
50
  }
50
- r.series = w, s.cacheDatas = d, s.rawResult = l;
51
+ l.series = A, r.cacheDatas = n, r.rawResult = u;
51
52
  }
52
53
  export {
53
- a as updateChartOption
54
+ s as updateChartOption
54
55
  };
@@ -1,45 +1,46 @@
1
1
  import { getValueFromSource as o } from "../page-helper-util.js";
2
2
  import { deepCopy as s } from "../common-util.js";
3
- import { caculateFormulaValue as i, executeChartFormula as e } from "./chart-util.js";
4
- function r(r2, t, a, l) {
5
- if (!l || !l.result) return;
6
- const u = l && l.result ? l.result : {}, f = t.serviceDataField;
7
- let c = null;
8
- f ? c = u[f] : u && (c = Array.isArray(u) ? u : [u]), c || (c = []);
9
- const d = t.items ? t.items : [], n = [], p = {};
10
- for (const o2 of d) {
11
- const s2 = o2.props ? o2.props : {}, i2 = o2.props ? o2.style : {}, e2 = s2.xaxisField, r3 = s2.sizeField, t2 = { uuid: o2.uuid, xaxisField: e2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: r3, symbolSize: i2.symbolSize, data: [] };
12
- n.push(t2), p[t2.uuid] = t2;
3
+ import { setDefaultGrid as i, caculateFormulaValue as e, executeChartFormula as r } from "./chart-util.js";
4
+ function t(t2, a, l, u) {
5
+ if (!u || !u.result) return;
6
+ i(l);
7
+ const f = u && u.result ? u.result : {}, c = a.serviceDataField;
8
+ let d = null;
9
+ c ? d = f[c] : f && (d = Array.isArray(f) ? f : [f]), d || (d = []);
10
+ const n = a.items ? a.items : [], p = [], m = {};
11
+ for (const o2 of n) {
12
+ const s2 = o2.props ? o2.props : {}, i2 = o2.props ? o2.style : {}, e2 = s2.xaxisField, r2 = s2.sizeField, t3 = { uuid: o2.uuid, xaxisField: e2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: r2, symbolSize: i2.symbolSize, data: [] };
13
+ p.push(t3), m[t3.uuid] = t3;
13
14
  }
14
- const m = [], x = i(d, c, m);
15
- for (const o2 of n) if ("formula" === o2.yaxisSource) {
15
+ const x = [], y = e(n, d, x);
16
+ for (const o2 of p) if ("formula" === o2.yaxisSource) {
16
17
  let s2 = o2.formula ? o2.formula : "";
17
- for (const o3 in x) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), x[o3]);
18
+ for (const o3 in y) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), y[o3]);
18
19
  o2.formula = s2;
19
20
  }
20
- const y = {};
21
- for (const s2 of c) if (s2) {
22
- for (const i2 of m) {
21
+ const F = {};
22
+ for (const s2 of d) if (s2) {
23
+ for (const i2 of x) {
23
24
  const e2 = o(s2, i2, void 0);
24
- let r3 = y[i2];
25
- void 0 === e2 || isNaN(e2) || (void 0 === r3 ? r3 = e2 : r3 += e2), y[i2] = r3;
25
+ let r2 = F[i2];
26
+ void 0 === e2 || isNaN(e2) || (void 0 === r2 ? r2 = e2 : r2 += e2), F[i2] = r2;
26
27
  }
27
- for (const i2 of n) {
28
- const t2 = i2.data, a2 = [];
28
+ for (const i2 of p) {
29
+ const e2 = i2.data, a2 = [];
29
30
  if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
30
- const o2 = e(i2.formula, y, s2, r2);
31
+ const o2 = r(i2.formula, F, s2, t2);
31
32
  a2.push(o2);
32
33
  } else a2.push(o(s2, i2.yaxisField, void 0));
33
- i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), t2.push(a2);
34
+ i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), e2.push(a2);
34
35
  }
35
36
  }
36
- const F = t.defaultSeries, h = s(F);
37
- for (const o2 of h) {
38
- const s2 = p[o2.uuid];
37
+ const h = a.defaultSeries, S = s(h);
38
+ for (const o2 of S) {
39
+ const s2 = m[o2.uuid];
39
40
  o2.data = s2.data;
40
41
  }
41
- a.series = h, t.cacheDatas = c, t.rawResult = l;
42
+ l.series = S, a.cacheDatas = d, a.rawResult = u;
42
43
  }
43
44
  export {
44
- r as updateChartOption
45
+ t as updateChartOption
45
46
  };
@@ -110,3 +110,4 @@ export declare function exportCommonChart(chartRef: any): {
110
110
  fileSize: string;
111
111
  };
112
112
  export declare function setHomeChartInitConfigValue(initConfig: any, tempContext: any, homeChartSettingUserId: any): void;
113
+ export declare function setDefaultGrid(chartOption: any): void;
@@ -2,7 +2,7 @@ import t from "../../../../assets/chart-themes/theme1.js";
2
2
  import e from "../../../../assets/chart-themes/theme2.js";
3
3
  import n from "../../../../assets/chart-themes/theme3.js";
4
4
  import { getDefaultValue as i } from "../page-init-util.js";
5
- import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as a, getValueFromVariable as l, setVariableValue as c } from "../page-helper-util.js";
5
+ import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as l, getValueFromVariable as a, setVariableValue as c } from "../page-helper-util.js";
6
6
  import { appendDefaultMethods as f } from "../events/event-util.js";
7
7
  var u = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(u || {});
8
8
  const d = { theme1: t, theme2: e, theme3: n };
@@ -22,10 +22,10 @@ function m(t2, e2, n2, i2, s2) {
22
22
  let t3 = parseInt(e2);
23
23
  (null == t3 || isNaN(t3)) && (t3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(t3));
24
24
  }
25
- let a2 = "";
26
- t2.indexOf("prefix") > -1 && n2 && (a2 = n2);
27
25
  let l2 = "";
28
- return t2.indexOf("append") > -1 && i2 && (l2 = i2), a2 + r2.toLocaleString() + l2;
26
+ t2.indexOf("prefix") > -1 && n2 && (l2 = n2);
27
+ let a2 = "";
28
+ return t2.indexOf("append") > -1 && i2 && (a2 = i2), l2 + r2.toLocaleString() + a2;
29
29
  };
30
30
  }
31
31
  function g(t2, e2) {
@@ -54,15 +54,15 @@ function x(t2, e2, n2) {
54
54
  let o2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = -1;
55
55
  if (o2) {
56
56
  const t3 = [];
57
- for (let a2 = 0; a2 < o2.length; a2++) {
58
- const l2 = o2[a2], c2 = l2.seriesIndex === s2.seriesIndex && l2.dataIndex === s2.dataIndex;
57
+ for (let l2 = 0; l2 < o2.length; l2++) {
58
+ const a2 = o2[l2], c2 = a2.seriesIndex === s2.seriesIndex && a2.dataIndex === s2.dataIndex;
59
59
  if (c2 || !i2.multiple) {
60
60
  if (i2.selected) {
61
61
  const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
62
- n2.dispatchAction({ type: t4, seriesIndex: l2.seriesIndex, dataIndex: l2.dataIndex });
62
+ n2.dispatchAction({ type: t4, seriesIndex: a2.seriesIndex, dataIndex: a2.dataIndex });
63
63
  }
64
- } else t3.push(l2);
65
- c2 && (r2 = a2);
64
+ } else t3.push(a2);
65
+ c2 && (r2 = l2);
66
66
  }
67
67
  o2 = t3;
68
68
  }
@@ -89,12 +89,12 @@ function b(t2, e2) {
89
89
  if (!e2.clickSet) return;
90
90
  const n2 = e2.clickSet, i2 = n2.variables;
91
91
  if (!i2 || 0 == i2.length) return;
92
- const r2 = e2.highlightInfos ? e2.highlightInfos : [], a2 = e2.cacheDatas ? e2.cacheDatas : [], l2 = [], c2 = [];
93
- for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < a2.length && l2.push(a2[t3.dataIndex]));
92
+ const r2 = e2.highlightInfos ? e2.highlightInfos : [], l2 = e2.cacheDatas ? e2.cacheDatas : [], a2 = [], c2 = [];
93
+ for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < l2.length && a2.push(l2[t3.dataIndex]));
94
94
  for (const e3 of i2) {
95
95
  if (!e3.fieldName || !e3.variable) continue;
96
96
  const i3 = [];
97
- for (const t3 of l2) {
97
+ for (const t3 of a2) {
98
98
  const n3 = s(t3, e3.fieldName, void 0);
99
99
  null != n3 && i3.push(n3);
100
100
  }
@@ -115,11 +115,11 @@ function v(t2, e2, n2) {
115
115
  }
116
116
  }
117
117
  if (!r2) return;
118
- const l2 = e2.props ? e2.props.orderSource : "";
118
+ const a2 = e2.props ? e2.props.orderSource : "";
119
119
  let c2 = e2.props ? e2.props.orderFix : "";
120
- if ("variable" == l2) {
120
+ if ("variable" == a2) {
121
121
  const n3 = e2.props ? e2.props.orderVariable : "";
122
- c2 = a(t2, n3);
122
+ c2 = l(t2, n3);
123
123
  }
124
124
  c2 = "desc" == c2 || "DESC" == c2 ? "desc" : "asc", n2.sort((t3, e3) => {
125
125
  const n3 = s(t3, r2, void 0), i3 = s(e3, r2, void 0);
@@ -130,14 +130,14 @@ function N(t2, e2, n2, i2, o2) {
130
130
  if (!n2) return n2;
131
131
  const r2 = e2.props ? e2.props : {};
132
132
  if (!r2.limitQuantity) return n2;
133
- let l2 = null;
134
- if (r2.itemNumVariable ? (l2 = a(t2, r2.itemNumVariable), l2 = parseInt(l2)) : l2 = r2.itemNumFix ? r2.itemNumFix : 10, null == l2 || null == l2 || isNaN(l2)) return n2;
135
- if (n2.length < l2) return n2;
133
+ let a2 = null;
134
+ if (r2.itemNumVariable ? (a2 = l(t2, r2.itemNumVariable), a2 = parseInt(a2)) : a2 = r2.itemNumFix ? r2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return n2;
135
+ if (n2.length < a2) return n2;
136
136
  const c2 = r2.overItemAlias, f2 = [], u2 = {};
137
137
  i2 = i2 || [], o2 = o2 || [];
138
138
  for (let t3 = 0; t3 < n2.length; t3++) {
139
139
  const e3 = n2[t3];
140
- if (t3 < l2) f2.push(e3);
140
+ if (t3 < a2) f2.push(e3);
141
141
  else {
142
142
  if (!c2) break;
143
143
  for (const t4 of i2) {
@@ -212,11 +212,11 @@ function k(t2, e2, n2, i2) {
212
212
  const o2 = r(t2);
213
213
  for (const e3 of o2) {
214
214
  let o3 = null;
215
- o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) : l(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), o3);
215
+ o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) : a(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), o3);
216
216
  }
217
217
  t2.includes("return ") || (t2 = "return " + t2);
218
- const a2 = new Function("params", t2);
219
- return f(a2, i2), a2({ pageContext: i2, row: n2 });
218
+ const l2 = new Function("params", t2);
219
+ return f(l2, i2), l2({ pageContext: i2, row: n2 });
220
220
  }
221
221
  function M(t2) {
222
222
  if (!t2 || !t2.$el) return;
@@ -245,6 +245,12 @@ function $(t2, e2, n2) {
245
245
  }
246
246
  }
247
247
  }
248
+ function w(t2) {
249
+ if (t2 == null ? void 0 : t2.grid) {
250
+ const e2 = t2.grid, n2 = (t3) => !t3 || "0" === t3;
251
+ n2(e2.top) && n2(e2.right) && n2(e2.bottom) && n2(e2.left) && Object.assign(e2, { right: "10%", bottom: "60", left: "10%" });
252
+ }
253
+ }
248
254
  export {
249
255
  u as CommonName,
250
256
  y as caculateFormulaValue,
@@ -261,6 +267,7 @@ export {
261
267
  g as initChartOption,
262
268
  N as limitDatas,
263
269
  x as monitorChartClickToVariable,
270
+ w as setDefaultGrid,
264
271
  $ as setHomeChartInitConfigValue,
265
272
  v as sortDatas,
266
273
  b as updateClickVariablesForSelected
@@ -27,3 +27,7 @@ export declare function isNumber(numStr: any): boolean;
27
27
  export declare function isWorkflowPage(pageContext: PageContext): boolean;
28
28
  export declare function refreshMobileDialogType(jumpPageSetting: any, isMobile: boolean): void;
29
29
  export declare function isVariableInvalidValue(values: any, variable: string): boolean;
30
+ /**
31
+ * 给主表字段添加必填高亮样式
32
+ */
33
+ export declare function addRequiredClassUtil(): string;
@@ -99,7 +99,11 @@ function g(e2, t2) {
99
99
  function h(e2, t2) {
100
100
  return null === e2[t2] || void 0 === e2[t2] || "" === e2[t2];
101
101
  }
102
+ function y() {
103
+ return "required_bg";
104
+ }
102
105
  export {
106
+ y as addRequiredClassUtil,
103
107
  p as deepCopy,
104
108
  i as getBaseUrl,
105
109
  s as getListCode,
@@ -146,10 +146,10 @@ function F(e2, t2, i2) {
146
146
  r3 ? n(r3) ? r3.then((n2) => {
147
147
  n2 ? A(e2, t2, c2, i2) : e2.canClick = true;
148
148
  }).catch((n2) => {
149
- console.error(n2), e2.canClick = true;
149
+ e2.canClick = true;
150
150
  }) : A(e2, t2, c2, i2) : e2.canClick = true;
151
151
  }).catch((n2) => {
152
- console.error(n2), e2.canClick = true;
152
+ e2.canClick = true;
153
153
  });
154
154
  }
155
155
  function T(e2, n2, t2, i2, o2) {
@@ -214,7 +214,7 @@ function A(e2, t2, i2, o2) {
214
214
  n(a2) ? a2.then((n2) => {
215
215
  n2 ? q(e3, t3, o3, c2, n2, u3) : e3.canClick = true;
216
216
  }).catch((n2) => {
217
- console.error(n2), e3.canClick = true;
217
+ e3.canClick = true;
218
218
  }) : q(e3, t3, o3, c2, a2, u3);
219
219
  } else q(e3, t3, o3, false, null, u3);
220
220
  }(e2, t2, i2, o2);
@@ -3,27 +3,26 @@ 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), r2 = [];
6
+ const a3 = JSON.parse(e2[0].template), i2 = [];
7
7
  a3.panels.forEach((e3) => {
8
8
  e3.printElements.forEach((e4) => {
9
- "barcode" !== e4.options.textType && "qrcode" !== e4.options.textType || r2.push(e4.options);
9
+ "barcode" !== e4.options.textType && "qrcode" !== e4.options.textType || i2.push(e4.options);
10
10
  });
11
11
  });
12
- const i = new t.PrintTemplate({ template: a3 }), l = { callback: () => {
12
+ const l = new t.PrintTemplate({ template: a3 }), r = { callback: () => {
13
13
  }, styleHandler: () => "" }, c = { leftOffset: -1, topOffset: -1 }, f = {};
14
14
  a3.panels[0].printElements.forEach((e3) => {
15
15
  if ("datetime" === e3.options.dataType && e3.options.field) {
16
16
  const t2 = e3.options.field.substring(6);
17
17
  f[t2] = e3.options.dateFormat;
18
18
  }
19
- }), n2.pageContext.pageType ? "list" === n2.pageContext.pageType ? function(e3, t2, n3, a4, s2, r3) {
20
- const i2 = JSON.parse(JSON.stringify(e3.selections));
21
- if (i2.forEach((e4) => {
19
+ }), n2.pageContext.pageType ? "list" === n2.pageContext.pageType ? function(e3, t2, n3, a4, s2, i3) {
20
+ const l2 = JSON.parse(JSON.stringify(e3.selections));
21
+ if (l2.forEach((e4) => {
22
22
  Object.keys(t2).forEach((t3) => {
23
23
  if (e4[t3] && "number" == typeof e4[t3] && !isNaN(e4[t3])) try {
24
24
  e4[t3] = new Date(e4[t3]);
25
25
  } catch (e5) {
26
- console.error(`日期格式化失败: ${e5}`);
27
26
  }
28
27
  });
29
28
  }), n3.length > 0) {
@@ -31,51 +30,51 @@ function a(n2, a2) {
31
30
  n3.forEach((t3) => {
32
31
  e4.push(function(e5, t4) {
33
32
  return new Promise((n4, a5) => {
34
- const s3 = e5.field.split("."), r4 = [];
33
+ const s3 = e5.field.split("."), i4 = [];
35
34
  s3.length < 2 && n4([]);
36
35
  try {
37
36
  p(s3[1]).then((e6) => {
38
37
  t4.forEach((t5, n5) => {
39
38
  const a6 = { type: s3[0], name: s3[1], value: null, index: n5 };
40
- a6.value = o(JSON.parse(e6.barcodeModelItems), t5), r4.push(a6);
41
- }), n4(r4);
39
+ a6.value = o(JSON.parse(e6.barcodeModelItems), t5), i4.push(a6);
40
+ }), n4(i4);
42
41
  });
43
42
  } catch (e6) {
44
- console.error("获取条码规则失败:", e6), n4([]);
43
+ n4([]);
45
44
  }
46
45
  });
47
- }(t3, i2));
46
+ }(t3, l2));
48
47
  }), Promise.all(e4).then((e5) => {
49
48
  e5.forEach((e6) => {
50
49
  e6.forEach((e7) => {
51
- const t3 = e7.index, n4 = i2[t3];
50
+ const t3 = e7.index, n4 = l2[t3];
52
51
  n4[e7.type] || (n4[e7.type] = {}), n4[e7.type][e7.name] = e7.value;
53
52
  });
54
- }), a4.print(i2, s2, r3);
53
+ }), a4.print(l2, s2, i3);
55
54
  });
56
- } else a4.print(i2, s2, r3);
57
- }(n2, f, r2, i, c, l) : "form" === n2.pageContext.pageType && s(n2, r2, i, c, l) : s(n2, r2, i, c, l);
55
+ } else a4.print(l2, s2, i3);
56
+ }(n2, f, i2, l, c, r) : "form" === n2.pageContext.pageType && s(n2, i2, l, c, r) : s(n2, i2, l, c, r);
58
57
  });
59
58
  }
60
59
  function s(e2, t2, n2, a2, s2) {
61
60
  if (t2.length > 0) {
62
- const r2 = [];
61
+ const i2 = [];
63
62
  t2.forEach((t3) => {
64
- r2.push(function(e3, t4) {
63
+ i2.push(function(e3, t4) {
65
64
  return new Promise((n3, a3) => {
66
- const s3 = t4.field.split("."), r3 = { type: null, name: null, value: null };
67
- s3.length < 2 && n3(r3), r3.type = s3[0], r3.name = s3[1];
65
+ const s3 = t4.field.split("."), i3 = { type: null, name: null, value: null };
66
+ s3.length < 2 && n3(i3), i3.type = s3[0], i3.name = s3[1];
68
67
  try {
69
- p(r3.name).then((t5) => {
68
+ p(i3.name).then((t5) => {
70
69
  const a4 = JSON.parse(t5.barcodeModelItems);
71
- r3.value = o(a4, e3.entity.data), n3(r3);
70
+ i3.value = o(a4, e3.entity.data), n3(i3);
72
71
  });
73
72
  } catch (e4) {
74
- console.error("获取条码规则失败:", e4), n3(r3);
73
+ n3(i3);
75
74
  }
76
75
  });
77
76
  }(e2.pageContext, t3));
78
- }), Promise.all(r2).then((t3) => {
77
+ }), Promise.all(i2).then((t3) => {
79
78
  const o2 = {};
80
79
  t3.forEach((e3) => {
81
80
  e3.type && e3.name && e3.value && (o2[e3.type] || (o2[e3.type] = {}), o2[e3.type][e3.name] = e3.value);
@@ -93,8 +92,8 @@ function p(t2) {
93
92
  return e.get(window.$vueApp.config.globalProperties.baseAPI + `/dc/setting-barcode-models/by-name?name=${n2}`);
94
93
  }
95
94
  n();
96
- const r = { printLabel: a };
95
+ const i = { printLabel: a };
97
96
  export {
98
- r as default,
97
+ i as default,
99
98
  a as printLabel
100
99
  };