super-page-runtime 2.2.26 → 2.2.29-tmp1

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 (42) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +56 -56
  2. package/dist/es/components/runtime/utils/barcode-util.js +5 -5
  3. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +46 -45
  4. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +16 -14
  5. package/dist/es/components/runtime/utils/charts/chart-util.js +4 -2
  6. package/dist/es/components/runtime/utils/events/event-util.js +113 -113
  7. package/dist/es/components/runtime/utils/events/print-label.js +38 -37
  8. package/dist/es/components/runtime/utils/events/standard-event.js +443 -431
  9. package/dist/es/components/runtime/utils/events/validator-util.js +30 -30
  10. package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
  11. package/dist/es/components/runtime/utils/page-helper-util.js +215 -214
  12. package/dist/es/components/runtime/utils/page-init-util.js +46 -42
  13. package/dist/es/components/runtime/utils/page-store.js +1 -1
  14. package/dist/es/components/runtime/utils/table-utils.js +23 -23
  15. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +16 -12
  16. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  17. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +11 -9
  18. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +13 -12
  19. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +14 -13
  20. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +15 -14
  21. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +17 -16
  22. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +12 -7
  23. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +16 -15
  24. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +26 -22
  25. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +3 -3
  26. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
  27. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +114 -111
  28. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +139 -136
  29. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -0
  30. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +29 -29
  31. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +40 -38
  32. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +22 -22
  33. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +39 -38
  34. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +8 -6
  35. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -9
  36. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +1 -0
  37. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -0
  38. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
  39. package/dist/es/components/runtime/views/home-chart.vue.js +10 -9
  40. package/dist/es/components/runtime/views/super-page-dialog.vue.js +13 -12
  41. package/dist/es/components/runtime/views/super-page.vue.js +134 -132
  42. package/package.json +2 -2
@@ -1,35 +1,36 @@
1
- import { defineComponent as e, ref as r, onMounted as t, watch as o, createElementBlock as a, openBlock as n, normalizeClass as u, normalizeStyle as s, unref as i, withDirectives as c, createVNode as p, vShow as f } from "vue";
2
- import { getCustomTheme as m, initChartOption as h, exportCommonChart as l } from "../../../../utils/charts/chart-util.js";
1
+ import { defineComponent as e, ref as r, onMounted as o, watch as t, createElementBlock as n, openBlock as a, normalizeClass as s, normalizeStyle as c, unref as i, withDirectives as u, createVNode as p, vShow as l } from "vue";
2
+ import { getCustomTheme as f, initChartOption as m, exportCommonChart as h } from "../../../../utils/charts/chart-util.js";
3
3
  import { getChartDatasFromPage as g, updateChartDatasources as d, monitorFieldChange as x } from "../../../../utils/page-helper-util.js";
4
4
  import { updateChartOption as C } from "../../../../utils/charts/chart-scatter-util.js";
5
5
  import v from "../common/common-chart-header.vue.js";
6
6
  import { use as R } from "echarts/core";
7
7
  import { CanvasRenderer as y } from "echarts/renderers";
8
8
  import { ScatterChart as V } from "echarts/charts";
9
- import { GridComponent as _, LegendComponent as j, TitleComponent as w, TooltipComponent as I, ToolboxComponent as k, DataZoomComponent as b } from "echarts/components";
10
- import H from "vue-echarts";
11
- const z = e({ __name: "scatter-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
12
- R([y, V, _, j, w, I, k, b]);
13
- const D = e2, F = r(null), O = r(null), P = r(null), S = D.configure.runtime ? D.configure.runtime : {}, T = S.style, q = S.class, A = S.dataConfig, B = S.headerInfo ? S.headerInfo : {}, E = S.chartOption, G = D.configure.props ? D.configure.props : {}, J = m(G.customTheme);
14
- h(D.configure, E), t(() => {
15
- const e3 = g(D.pageContext, D.configure);
9
+ import { GridComponent as _, LegendComponent as j, TitleComponent as w, TooltipComponent as I, ToolboxComponent as k, DataZoomComponent as O } from "echarts/components";
10
+ import b from "vue-echarts";
11
+ const H = e({ __name: "scatter-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: H2 }) {
12
+ R([y, V, _, j, w, I, k, O]);
13
+ const z = e2, D = r(null), F = r(null), P = r(null), S = z.configure.runtime ? z.configure.runtime : {}, T = S.style, q = S.class, A = S.dataConfig, B = S.headerInfo ? S.headerInfo : {}, E = S.chartOption, G = z.configure.props ? z.configure.props : {}, J = f(G.customTheme);
14
+ m(z.configure, E), console.log("chartOption", E), o(() => {
15
+ const e3 = g(z.pageContext, z.configure);
16
16
  e3 && N(e3);
17
17
  });
18
18
  let K = B.groupValue;
19
19
  function L() {
20
- A && d(D.pageContext, [A], B.drillParams);
20
+ A ? d(z.pageContext, [A], B.drillParams) : console.log("无数据源配置,不需要查询!");
21
21
  }
22
- o(B, () => {
22
+ t(B, () => {
23
23
  K != B.groupValue && (K = B.groupValue, A && (A.services[0].groupValue = B.groupValue), L());
24
24
  });
25
25
  const M = B.monitorFields;
26
26
  function N(e3) {
27
- e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender ? e3.hasRender = true : (e3.hasRender = true, C(D.pageContext, D.configure, E, e3));
27
+ if (e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
28
+ e3.hasRender = true, C(z.pageContext, z.configure, E, e3), console.log("chartOption scatter", E);
28
29
  }
29
- return x(D.pageContext, M, L), z2({ updateChartDatas: N, exportChart: function() {
30
- return l(O.value);
31
- } }), (e3, r2) => (n(), a("div", { style: s(i(T)), class: u([i(q), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: F }, [c(p(v, { ref_key: "headerRef", ref: P, headerInfo: i(B), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[f, i(B).showHeader || e3.pageContext.showHomepageSearch]]), p(i(H), { ref_key: "chartRef", ref: O, theme: i(J), option: i(E), autoresize: "" }, null, 8, ["theme", "option"])], 6));
30
+ return x(z.pageContext, M, L), H2({ updateChartDatas: N, exportChart: function() {
31
+ return h(F.value);
32
+ } }), (e3, r2) => (a(), n("div", { style: c(i(T)), class: s([i(q), "amb-widget-chart amb-widget-flex"]), ref_key: "thisRef", ref: D }, [u(p(v, { ref_key: "headerRef", ref: P, headerInfo: i(B), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[l, i(B).showHeader || e3.pageContext.showHomepageSearch]]), p(i(b), { ref_key: "chartRef", ref: F, theme: i(J), option: i(E), autoresize: "" }, null, 8, ["theme", "option"])], 6));
32
33
  } });
33
34
  export {
34
- z as default
35
+ H as default
35
36
  };
@@ -61,7 +61,7 @@ class ExpressionEvaluator {
61
61
  try {
62
62
  return eval(expression);
63
63
  } catch (e) {
64
- return false;
64
+ return console.error("表达式错误:", expression, e), false;
65
65
  }
66
66
  }
67
67
  }
@@ -90,6 +90,7 @@ function summaryStatistics(e, t, o, r) {
90
90
  const e2 = n2.apply(n2, [{ data: t, prop: o }]);
91
91
  a = e2 ? ` ${e2}` : " N/A";
92
92
  } catch (e2) {
93
+ console.error("自定义函数脚本错误:", t, e2);
93
94
  }
94
95
  else a = " N/A";
95
96
  } else switch (n) {
@@ -122,7 +123,8 @@ function getHeaderCellStyleUtil(e, t, o) {
122
123
  const a2 = getCustomFunc(o.pageContext, t2.scopeFunc);
123
124
  if (a2) try {
124
125
  false !== a2.apply(a2, [{ item: t2, data: e }]) && copyStyle(r, t2);
125
- } catch (e2) {
126
+ } catch (o2) {
127
+ console.error("自定义函数脚本错误:", t2, e, o2);
126
128
  }
127
129
  } else copyStyle(r, t2);
128
130
  }));
@@ -138,7 +140,8 @@ function getRowStyleUtil(e, t, o) {
138
140
  if (t3) try {
139
141
  const o2 = t3.apply(t3, [{ data: e }]);
140
142
  null != o2 && false !== o2 && copyStyle(r, a);
141
- } catch (e2) {
143
+ } catch (t4) {
144
+ console.error("自定义函数脚本错误:", e, t4);
142
145
  }
143
146
  } else if (a.matchingCondition) {
144
147
  const t3 = ExpressionEvaluator.evaluate(o.pageContext, a.matchingCondition, e.row);
@@ -162,7 +165,8 @@ function getCellStyleUtil(e, t, o) {
162
165
  const t2 = getCustomFunc(o.pageContext, n.scopeFunc);
163
166
  if (t2) try {
164
167
  false !== t2.apply(t2, [{ data: e }]) && copyStyle(r, n);
165
- } catch (e2) {
168
+ } catch (t3) {
169
+ console.error("自定义函数脚本错误:", e, t3);
166
170
  }
167
171
  } else if (n.matchingCondition) {
168
172
  const t2 = ExpressionEvaluator.evaluate(o.pageContext, n.matchingCondition, e.row);
@@ -286,7 +290,7 @@ function computeFormula(itemConfs, datas, entity) {
286
290
  o += Number(e2[t]);
287
291
  });
288
292
  } catch (e2) {
289
- o = 0;
293
+ console.error("计算错误:", e2), o = 0;
290
294
  }
291
295
  totalValueMap[e] = o;
292
296
  } else (e.startsWith("${page.") || e.startsWith("${data.") || e.startsWith("${row.") || e.startsWith("${request.") || e.startsWith("${context.") || e.startsWith("${system.") || e.startsWith("${fixed.")) && (totalValueMap[e] = getValueFromVariable(entity, e, data));
@@ -298,7 +302,7 @@ function computeFormula(itemConfs, datas, entity) {
298
302
  try {
299
303
  data[key] = eval(expr);
300
304
  } catch (e) {
301
- data[key] = 0;
305
+ console.error(itemConfs[key] + " 计算错误, 替换后表达式为:" + expr, e), data[key] = 0;
302
306
  }
303
307
  });
304
308
  });
@@ -338,7 +342,8 @@ function formatCustomFunc(e, t, o, r, a) {
338
342
  if (n) {
339
343
  try {
340
344
  return n.apply(n, [{ pageContext: r, configureObj: a, row: e, prop: o.props.base.prop }]);
341
- } catch (e2) {
345
+ } catch (t2) {
346
+ console.error("自定义函数脚本错误:", e, t2);
342
347
  }
343
348
  return "";
344
349
  }
@@ -1,15 +1,15 @@
1
- import { defineComponent as e, ref as o, onMounted as n, watch as r, resolveComponent as t, createElementBlock as i, openBlock as a, normalizeClass as u, normalizeStyle as p, unref as l, withDirectives as s, createVNode as c, createBlock as g, createCommentVNode as f, vShow as d, withCtx as m, Fragment as h, renderList as v, h as y } from "vue";
1
+ import { defineComponent as e, ref as o, onMounted as n, watch as r, resolveComponent as t, createElementBlock as i, openBlock as a, normalizeClass as u, normalizeStyle as l, unref as p, withDirectives as s, createVNode as c, createBlock as g, createCommentVNode as f, vShow as d, withCtx as m, Fragment as h, renderList as v, h as y } from "vue";
2
2
  import C from "../common/common-chart-header.vue.js";
3
3
  import { getSizeConfig as x, getChartDatasFromPage as b, getValueFromVariable as O, isPromise as w, setValueForVariableName as S, updateChartDatasourcesByComponent as j, caculateShowCondition as E } from "../../../../utils/page-helper-util.js";
4
4
  import { getCustomFunc as $ } from "../../../../utils/events/event-util.js";
5
5
  import k from "./group-column.vue.js";
6
6
  import F from "./normal-column.vue.js";
7
7
  import I from "./table-pageination.vue.js";
8
- import { getSummaryTitleColumn as R, getSummaryDataColumn as H, rowDataToColumn as T, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as D, getNewColumnConfig as P, summaryStatistics as U, replacePlaceholders as G, getIndexColumn as K, getHeaderCellStyleUtil as N, getRowStyleUtil as J, getCellStyleUtil as L, formatColContent as V } from "./chart-table-util.js";
8
+ import { getSummaryTitleColumn as R, getSummaryDataColumn as H, rowDataToColumn as T, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as D, getNewColumnConfig as P, summaryStatistics as U, replacePlaceholders as G, getIndexColumn as K, getHeaderCellStyleUtil as N, getRowStyleUtil as V, getCellStyleUtil as J, formatColContent as L } from "./chart-table-util.js";
9
9
  import { deepCopy as A } from "../../../../utils/common-util.js";
10
10
  const q = e({ __name: "table-runtime", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, setup(e2, { expose: q2 }) {
11
11
  var _a;
12
- const B = e2, M = B.configure.runtime ? B.configure.runtime : {}, Q = M.style, W = M.class, X = M.dataConfig, Y = M.headerInfo ? M.headerInfo : {}, Z = o(null), ee = o(M.props.isEnableGroupHeader), oe = o([]), ne = o([]), re = o([]), te = o({}), ie = o(false), ae = o({}), ue = o({}), pe = o({}), le = [], se = o({}), ce = o({}), ge = o(null), fe = o(0);
12
+ const B = e2, M = B.configure.runtime ? B.configure.runtime : {}, Q = M.style, W = M.class, X = M.dataConfig, Y = M.headerInfo ? M.headerInfo : {}, Z = o(null), ee = o(M.props.isEnableGroupHeader), oe = o([]), ne = o([]), re = o([]), te = o({}), ie = o(false), ae = o({}), ue = o({}), le = o({}), pe = [], se = o({}), ce = o({}), ge = o(null), fe = o(0);
13
13
  let de = [];
14
14
  if (!B.configure.props.modelCustom) {
15
15
  if (ee.value) {
@@ -28,19 +28,20 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
28
28
  te.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (se.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (ce.value[e3.props.base.prop] = e3.formula);
29
29
  });
30
30
  }
31
- ie.value = B.configure.props.base.showSummary, (ie.value || B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) && (ae.value = R(B.configure), ie.value && (ue.value = H(B.configure, "table")), B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0 && (pe.value = H(B.configure, "group")));
31
+ ie.value = B.configure.props.base.showSummary, (ie.value || B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) && (ae.value = R(B.configure), ie.value && (ue.value = H(B.configure, "table")), B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0 && (le.value = H(B.configure, "group")));
32
32
  let me = 300, he = x(B.pageContext, B.configure);
33
33
  function ve() {
34
34
  const e3 = B.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o2 = e3 ? e3[1].split(".") : [];
35
35
  r(() => o2.reduce((e4, o3) => e4[o3], B.pageContext.entity), (e4) => {
36
- e4 ? ye(JSON.parse(JSON.stringify(e4))) : (oe.value = [], B.configure.props.modelCustom ? Re(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
36
+ console.log("统计表格监听数据变量的变化 newVal:", e4), e4 ? ye(JSON.parse(JSON.stringify(e4))) : (oe.value = [], console.log("重置统计表格列配置"), B.configure.props.modelCustom ? Re(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
37
37
  });
38
38
  }
39
39
  function ye(e3) {
40
- e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender ? e3.hasRender = true : (!function(e4) {
40
+ if (e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender) return e3.hasRender = true, void console.log("重复更新!", e3);
41
+ !function(e4) {
41
42
  Re(e4), "service" === B.configure.props.dataOrigin.dataSource && e4.result ? de = e4.result[B.configure.props.dataOrigin.service.serviceDataField] : "variable" === B.configure.props.dataOrigin.dataSource && (ve(), de = O(B.pageContext.entity, B.configure.props.dataOrigin.variable));
42
43
  de && Ce(de, e4);
43
- }(e3), e3.hasRender = true, X && (X.autoRefresh = false));
44
+ }(e3), e3.hasRender = true, X && (X.autoRefresh = false);
44
45
  }
45
46
  function Ce(e3, o2) {
46
47
  var _a2;
@@ -91,7 +92,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
91
92
  const e4 = B.configure.props.highOrder.groupField;
92
93
  oe.value = function(e5, o3) {
93
94
  var _a3, _b;
94
- if (0 === pe.value.length) return e5;
95
+ if (0 === le.value.length) return e5;
95
96
  const n2 = [], r2 = (_a3 = B.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), t2 = (_b = B.configure.items) == null ? void 0 : _b.filter((e6) => true === e6.props.base.groupSummary), i2 = {};
96
97
  e5.forEach((e6) => {
97
98
  const n3 = o3.map((o4) => e6[o4]).join("|");
@@ -101,12 +102,12 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
101
102
  for (let e6 = 0; e6 < a2.length; e6++) {
102
103
  const o4 = a2[e6], i3 = {};
103
104
  t2 == null ? void 0 : t2.forEach((e7) => {
104
- const n3 = e7.props.base.prop, r3 = U(pe.value[n3], o4, n3, B.pageContext);
105
+ const n3 = e7.props.base.prop, r3 = U(le.value[n3], o4, n3, B.pageContext);
105
106
  i3[n3] = r3;
106
107
  }), n2.push(...o4), r2 == null ? void 0 : r2.forEach((e7) => {
107
108
  const n3 = e7.props.base.prop;
108
109
  i3[n3] = G(e7.props.base.summaryTitle, o4[0]);
109
- }), n2.push(i3), le.push(n2.length - 1);
110
+ }), n2.push(i3), pe.push(n2.length - 1);
110
111
  }
111
112
  return n2;
112
113
  }(oe.value, e4);
@@ -126,11 +127,11 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
126
127
  return N(e3, { cellTitleStyle: o2, titleStyle: n2 }, B);
127
128
  }
128
129
  function Oe(e3) {
129
- return J(e3, le, B);
130
+ return V(e3, pe, B);
130
131
  }
131
132
  function we(e3) {
132
133
  const o2 = se.value[e3.column.property] ? se.value[e3.column.property].cellStyle : null;
133
- return L(e3, o2, B);
134
+ return J(e3, o2, B);
134
135
  }
135
136
  he && he.maxHeight && (me = he.maxHeight), !me && he && he.fixHeight && (me = he.fixHeight), me && (me = Number(me + "")), n(() => {
136
137
  const e3 = b(B.pageContext, B.configure);
@@ -148,7 +149,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
148
149
  const t2 = ae.value[e4.property].label;
149
150
  r2[o3] = y("div", {}, [G(t2, n2)]);
150
151
  } else if (ue.value[e4.property]) {
151
- const t2 = n2.filter((e5, o4) => !le.includes(o4));
152
+ const t2 = n2.filter((e5, o4) => !pe.includes(o4));
152
153
  r2[o3] = U(ue.value[e4.property], t2, e4.property, B.pageContext);
153
154
  }
154
155
  }), r2;
@@ -206,7 +207,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
206
207
  let o3 = [];
207
208
  oe.value && (o3 = A(oe.value), o3.forEach((o4) => {
208
209
  e4.forEach((e5) => {
209
- const n3 = V(o4, e5.props.format, e5, B.pageContext, B.configure);
210
+ const n3 = L(o4, e5.props.format, e5, B.pageContext, B.configure);
210
211
  o4[e5.props.base.prop] = n3;
211
212
  });
212
213
  }));
@@ -214,7 +215,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
214
215
  }(n2), columns: e3 };
215
216
  } }), (o2, n2) => {
216
217
  const r2 = t("el-table");
217
- return a(), i("div", { style: p([l(Q), { display: "flex", "flex-direction": "column" }]), class: u([l(W), "amb-widget-chart amb-widget-flex"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Z, headerInfo: l(Y), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, l(Y).showHeader || e2.pageContext.showHomepageSearch]]), c(r2, { ref_key: "gridRef", ref: ge, data: oe.value, style: { width: "100%" }, "max-height": l(me), "header-cell-style": be, "row-style": Oe, "cell-style": we, "show-summary": ie.value, stripe: e2.configure.props.base.stripe, "summary-method": Se, "span-method": je }, { default: m(() => [ee.value ? (a(true), i(h, { key: 0 }, v(re.value, (o3, n3) => (a(), i(h, { key: n3 }, [o3.isLeaf ? Ie(te.value[o3.columnUuid]) ? (a(), g(F, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: te.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : f("", true) : (a(), g(k, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: te.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (a(true), i(h, { key: 1 }, v(ne.value, (o3, n3) => (a(), i(h, { key: n3 }, [Ie(o3) ? (a(), g(F, { key: 0, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"])) : f("", true)], 64))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (a(), g(I, { key: 0, configure: e2.configure, "table-data": oe.value, total: fe.value, onPageChange: Ee, onPageSizeChange: $e }, null, 8, ["configure", "table-data", "total"])) : f("", true)], 6);
218
+ return a(), i("div", { style: l([p(Q), { display: "flex", "flex-direction": "column" }]), class: u([p(W), "amb-widget-chart amb-widget-flex"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Z, headerInfo: p(Y), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, p(Y).showHeader || e2.pageContext.showHomepageSearch]]), c(r2, { ref_key: "gridRef", ref: ge, data: oe.value, style: { width: "100%" }, "max-height": p(me), "header-cell-style": be, "row-style": Oe, "cell-style": we, "show-summary": ie.value, stripe: e2.configure.props.base.stripe, "summary-method": Se, "span-method": je }, { default: m(() => [ee.value ? (a(true), i(h, { key: 0 }, v(re.value, (o3, n3) => (a(), i(h, { key: n3 }, [o3.isLeaf ? Ie(te.value[o3.columnUuid]) ? (a(), g(F, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: te.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : f("", true) : (a(), g(k, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: te.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (a(true), i(h, { key: 1 }, v(ne.value, (o3, n3) => (a(), i(h, { key: n3 }, [Ie(o3) ? (a(), g(F, { key: 0, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"])) : f("", true)], 64))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (a(), g(I, { key: 0, configure: e2.configure, "table-data": oe.value, total: fe.value, onPageChange: Ee, onPageSizeChange: $e }, null, 8, ["configure", "table-data", "total"])) : f("", true)], 6);
218
219
  };
219
220
  } });
220
221
  export {
@@ -1,32 +1,36 @@
1
- import { defineComponent as e, ref as t, onMounted as a, resolveComponent as l, createBlock as o, openBlock as p, withCtx as r, createVNode as s, createTextVNode as u, toDisplayString as i } from "vue";
2
- import { packageTemplateFiles as n } from "../../../utils/common-util.js";
3
- const m = "${", d = "}", c = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object } }, emits: ["export", "close"], setup(e2, { emit: c2 }) {
4
- const g = e2, f = c2, b = t([]), h = t([]), x = g.configure.props.base, v = g.pageContext.entity.data;
1
+ import { defineComponent as e, ref as t, onMounted as l, resolveComponent as o, createBlock as a, openBlock as n, withCtx as s, createVNode as r, createTextVNode as u, toDisplayString as p } from "vue";
2
+ import { packageTemplateFiles as i } from "../../../utils/common-util.js";
3
+ const m = "${", c = "}", g = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object } }, emits: ["export", "close"], setup(e2, { emit: g2 }) {
4
+ const d = e2, f = g2, x = t([]), b = t([]), h = d.configure.props.base, v = d.pageContext.entity.data;
5
5
  function w(e3) {
6
- let t2, a2, l2 = e3;
7
- const o2 = l2.indexOf(m), p2 = l2.indexOf(d);
8
- return -1 !== o2 && -1 !== p2 ? (o2 > p2 ? l2 = l2.substring(0, p2) + l2.substring(p2 + 1) : (t2 = l2.substring(o2 + 2, p2), a2 = l2.substring(o2, p2 + 1), h.value.push(t2), l2 = l2.replace(a2, "")), w(l2)) : h.value;
6
+ let t2, l2;
7
+ console.log("templateShowName", e3);
8
+ let o2 = e3;
9
+ const a2 = o2.indexOf(m), n2 = o2.indexOf(c);
10
+ return console.log("prefixIndex", a2), console.log("suffixIndex", n2), -1 !== a2 && -1 !== n2 ? (a2 > n2 ? (o2 = o2.substring(0, n2) + o2.substring(n2 + 1), console.log("non replacement value === newValue", o2)) : (t2 = o2.substring(a2 + 2, n2), l2 = o2.substring(a2, n2 + 1), console.log("field", t2), console.log("formatStr", l2), b.value.push(t2), console.log("fields", b.value), o2 = o2.replace(l2, ""), console.log("newValue", o2)), w(o2)) : b.value;
9
11
  }
10
- function y() {
12
+ function N() {
11
13
  f("close");
12
14
  }
13
- return a(() => {
14
- x.templateFiles && x.templateFiles.length > 0 ? b.value = n(x.templateFiles) : x.templateUuid && x.templateName && b.value.push({ templateUuid: x.templateUuid, templateName: x.templateName }), b.value.forEach((e3) => {
15
- var t2;
16
- e3 && e3.templateName && (e3.templateName = (w(t2 = e3.templateName).forEach((e4) => {
17
- const a2 = m + e4 + d;
18
- let l2;
19
- -1 !== t2.indexOf(a2) && v.hasOwnProperty(e4) && (l2 = v[e4] ? v[e4] : "", t2 = t2.replace(a2, l2));
20
- }), t2));
15
+ return l(() => {
16
+ h.templateFiles && h.templateFiles.length > 0 ? x.value = i(h.templateFiles) : h.templateUuid && h.templateName && x.value.push({ templateUuid: h.templateUuid, templateName: h.templateName }), x.value.forEach((e3) => {
17
+ e3 && e3.templateName && (e3.templateName = function(e4) {
18
+ const t2 = w(e4);
19
+ return console.log("fields", t2), t2.forEach((t3) => {
20
+ const l2 = m + t3 + c;
21
+ let o2;
22
+ -1 !== e4.indexOf(l2) && v.hasOwnProperty(t3) && (o2 = v[t3] ? v[t3] : "", e4 = e4.replace(l2, o2));
23
+ }), e4;
24
+ }(e3.templateName));
21
25
  });
22
26
  }), (e3, t2) => {
23
- const a2 = l("el-table-column"), n2 = l("el-button"), m2 = l("el-table"), d2 = l("el-dialog");
24
- return p(), o(d2, { "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), "model-value": "", onClose: y }, { default: r(() => [s(m2, { data: b.value, style: { width: "100%" } }, { default: r(() => [s(a2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: r((e4) => [u(i(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), s(a2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: r((t3) => [s(n2, { type: "text", size: "small", onClick: (e4) => {
25
- return a3 = t3.row, void f("export", g.configure, a3);
26
- var a3;
27
- } }, { default: r(() => [u(i(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["title"]);
27
+ const l2 = o("el-table-column"), i2 = o("el-button"), m2 = o("el-table"), c2 = o("el-dialog");
28
+ return n(), a(c2, { "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), "model-value": "", onClose: N }, { default: s(() => [r(m2, { data: x.value, style: { width: "100%" } }, { default: s(() => [r(l2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: s((e4) => [u(p(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), r(l2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: s((t3) => [r(i2, { type: "text", size: "small", onClick: (e4) => {
29
+ return l3 = t3.row, void f("export", d.configure, l3);
30
+ var l3;
31
+ } }, { default: s(() => [u(p(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["title"]);
28
32
  };
29
33
  } });
30
34
  export {
31
- c as default
35
+ g as default
32
36
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, createElementBlock as a, openBlock as r, createElementVNode as s, normalizeStyle as u, normalizeClass as l, unref as p, Fragment as g, renderList as c, createBlock as f } from "vue";
1
+ import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, createElementBlock as a, openBlock as r, createElementVNode as l, normalizeStyle as s, normalizeClass as u, unref as p, Fragment as g, renderList as c, createBlock as f } from "vue";
2
2
  import d from "../../object-render.vue.js";
3
3
  import "../../../../utils/global-refs.js";
4
4
  import { handleAfterInitEvent as m } from "../../../../utils/events/event-util.js";
@@ -17,7 +17,7 @@ const v = { class: "amb-widget-tools-parent" }, x = e({ __name: "tools-runtime",
17
17
  "top" == e4 && (t2.top = n3.top + "px"), "bottom" == e4 && (t2.bottom = "10px");
18
18
  }
19
19
  const n2 = b.value.parentNode.getBoundingClientRect();
20
- t2.width = n2.width - 25 + "px", Object.assign(y.value, t2);
20
+ console.log("parentRec", n2), t2.width = n2.width - 25 + "px", Object.assign(y.value, t2);
21
21
  }
22
22
  }
23
23
  }();
@@ -27,7 +27,7 @@ const v = { class: "amb-widget-tools-parent" }, x = e({ __name: "tools-runtime",
27
27
  m(null, x2.pageContext, x2.configure, { componentRef: b.value, entity: x2.pageContext.entity.data, pageData: x2.pageContext.entity.page });
28
28
  });
29
29
  }), i(() => {
30
- }), (e3, t2) => (r(), a("div", v, [s("div", { class: l(["amb-widget-container-tool amb-widget-tools", p(w)]), style: u(y.value), ref_key: "thisRef", ref: b }, [(r(true), a(g, null, c(e3.configure.items, (t3, o2) => (r(), f(d, { key: t3.uuid, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"]))), 128))], 6)]));
30
+ }), (e3, t2) => (r(), a("div", v, [l("div", { class: u(["amb-widget-container-tool amb-widget-tools", p(w)]), style: s(y.value), ref_key: "thisRef", ref: b }, [(r(true), a(g, null, c(e3.configure.items, (t3, o2) => (r(), f(d, { key: t3.uuid, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"]))), 128))], 6)]));
31
31
  } });
32
32
  export {
33
33
  x as default
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, computed as t, ref as a, onMounted as r, watch as l, resolveComponent as o, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as s, unref as p, withCtx as c, createElementBlock as m, createCommentVNode as f, toDisplayString as g } from "vue";
1
+ import { defineComponent as e, computed as t, ref as r, onMounted as a, watch as o, resolveComponent as l, createBlock as n, openBlock as u, normalizeStyle as i, normalizeClass as s, unref as c, withCtx as p, createElementBlock as m, createCommentVNode as f, toDisplayString as g } from "vue";
2
2
  import d from "qrcode";
3
3
  import v from "jsbarcode";
4
4
  import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
@@ -12,7 +12,7 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
12
12
  let k = y(q.pageContext, q.configure);
13
13
  const A = t({ get: () => x(N, k), set(e3) {
14
14
  h(N, k, e3);
15
- } }), E = q.configure.runtime ? q.configure.runtime : {}, _ = a(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = a(""), I = a(null), Q = a(_.value.brCodeFormat ?? "CODE128"), V = a([]);
15
+ } }), E = q.configure.runtime ? q.configure.runtime : {}, _ = r(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = r(""), I = r(null), Q = r(_.value.brCodeFormat ?? "CODE128"), V = r([]);
16
16
  function F(e3) {
17
17
  return h(N, k, e3);
18
18
  }
@@ -22,31 +22,32 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
22
22
  function L(e3) {
23
23
  var t2;
24
24
  "QR-code" === _.value.type ? (t2 = e3, d.toDataURL(t2, (e4, t3) => {
25
- e4 || ($.value = t3);
25
+ e4 ? console.error(e4) : $.value = t3;
26
26
  })) : function(e4) {
27
27
  try {
28
28
  v(I.value, e4, { format: Q.value });
29
29
  } catch (e5) {
30
+ console.error("生成条形码时发生错误:", e5);
30
31
  }
31
32
  }(e3);
32
33
  }
33
- return r(() => {
34
+ return a(() => {
34
35
  _.value.generateRule && ("fixed" === _.value.generateRuleType ? (V.value = Array.from(_.value.generateRule.matchAll(/\$\{(\w+)\}/g), (e3) => e3[1]), V.value.forEach((e3) => {
35
- l(() => q.pageContext.entity.data[e3], (e4, t2) => {
36
+ o(() => q.pageContext.entity.data[e3], (e4, t2) => {
36
37
  null != e4 && function() {
37
38
  let e5 = true;
38
39
  V.value.forEach((t3) => {
39
40
  q.pageContext.entity.data[t3] || (e5 = false);
40
41
  }), e5 && J(function(e6, t3) {
41
- const a2 = /\$\{(\w+)\}/g;
42
- return e6.replace(a2, (e7, a3) => t3.hasOwnProperty(a3) ? t3[a3] : e7);
42
+ const r2 = /\$\{(\w+)\}/g;
43
+ return e6.replace(r2, (e7, r3) => t3.hasOwnProperty(r3) ? t3[r3] : e7);
43
44
  }(_.value.generateRule, q.pageContext.entity.data));
44
45
  }();
45
46
  });
46
47
  })) : w.get(window.$vueApp.config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + _.value.generateRule).then((e3) => {
47
48
  const t2 = JSON.parse(e3.barcodeModelItems);
48
49
  t2.forEach((e4) => {
49
- "-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), l(() => q.pageContext.entity.data[e4.propDbName], (e5, a2) => {
50
+ "-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), o(() => q.pageContext.entity.data[e4.propDbName], (e5, r2) => {
50
51
  if (null != e5) {
51
52
  const e6 = b(t2, q.pageContext.entity.data);
52
53
  e6 && J(e6);
@@ -54,12 +55,13 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
54
55
  }));
55
56
  });
56
57
  }).catch((e3) => {
58
+ console.error("获取条码规则失败:", e3);
57
59
  })), A.value && L(A.value);
58
60
  }), D2({ getValue: function() {
59
61
  return x(N, k);
60
62
  }, setValue: F }), (e3, t2) => {
61
- const a2 = o("el-form-item");
62
- return n(), u(a2, { required: !!_.value.required, class: s(p(P)), "label-width": _.value.labelWidth, style: i(p(O)) }, { label: c(() => [_.value.tittleShow ? (n(), m("div", { key: 0, style: i({ ...p(S) }) }, g(p(R)(_.value.title)), 5)) : f("", true)]), default: c(() => ["QR-code" === _.value.type ? (n(), m("img", { key: 0, src: $.value }, null, 8, j)) : (n(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
63
+ const r2 = l("el-form-item");
64
+ return u(), n(r2, { required: !!_.value.required, class: s(c(P)), "label-width": _.value.labelWidth, style: i(c(O)) }, { label: p(() => [_.value.tittleShow ? (u(), m("div", { key: 0, style: i({ ...c(S) }) }, g(c(R)(_.value.title)), 5)) : f("", true)]), default: p(() => ["QR-code" === _.value.type ? (u(), m("img", { key: 0, src: $.value }, null, 8, j)) : (u(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
63
65
  };
64
66
  } });
65
67
  export {