super-page-runtime 2.3.9-sit1 → 2.3.10

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 (28) 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 +57 -57
  3. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  4. package/dist/es/components/runtime/utils/events/print-label.js +26 -25
  5. package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
  6. package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
  7. package/dist/es/components/runtime/utils/page-init-util.js +25 -24
  8. package/dist/es/components/runtime/utils/page-store.js +10 -10
  9. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  10. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  11. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
  12. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +94 -89
  13. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +11 -9
  14. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
  15. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
  16. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +2 -1
  17. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +36 -41
  18. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
  19. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
  20. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +35 -34
  21. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
  22. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -0
  23. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +15 -14
  24. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  25. package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
  26. package/dist/es/components/runtime/views/super-page.vue2.js +12 -11
  27. package/dist/es.zip +0 -0
  28. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import e from "agilebuilder-ui/src/utils/request";
2
2
  import { getAdditionalParamMap as t } from "./events/standard-event.js";
3
3
  import { PageDimensions as s } from "./interfaces/page-design-types.js";
4
- import { getFormPropName as i, getVariableValue as n, setVariableValue as o, formatVariableValue as r } from "./page-helper-util.js";
4
+ import { getFormPropName as i, getVariableValue as o, setVariableValue as n, formatVariableValue as r } from "./page-helper-util.js";
5
5
  import { getSessionCache as l } from "agilebuilder-ui/src/utils/auth";
6
6
  import { functions as a } from "./api/page-expose-util.js";
7
7
  import { isWorkflowPage as p, deepCopy as u } from "./common-util.js";
@@ -40,6 +40,7 @@ function g(e2) {
40
40
  e3.duplicateFieldList && e3.duplicateFieldList.length > 0 && (e3.duplicateFieldList = e3.duplicateFieldList.map((e4) => "string" == typeof e4 ? { propDbName: e4 } : e4));
41
41
  }), e2.props.judgeHeavyList) : null;
42
42
  } catch (e3) {
43
+ console.error("getJudgeHeavyList error:", e3);
43
44
  }
44
45
  }
45
46
  function b(e2) {
@@ -61,7 +62,7 @@ function y(e2, t2) {
61
62
  }
62
63
  }
63
64
  function h(e2, t2) {
64
- if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
65
+ if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query, e2.query)) {
65
66
  Object.assign(t2, e2.query);
66
67
  w(e2.query.paramStoreId, t2);
67
68
  }
@@ -78,32 +79,32 @@ function w(e2, t2) {
78
79
  function E(e2, t2) {
79
80
  let s2, i2 = t2;
80
81
  t2 || (s2 = e2.props.base ? e2.props.base : {}, i2 = s2.prop);
81
- let n2 = null;
82
- return t2 && !t2.startsWith("${") ? n2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), n2 = i2.split("."), e2 && n2.length < 2 && (n2 = [e2.uuid])) : e2 && (n2 = ["page", e2.uuid]) : n2 = ["page", e2.uuid], n2 || e2 ? n2 : ["temp"];
82
+ let o2 = null;
83
+ return t2 && !t2.startsWith("${") ? o2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), o2 = i2.split("."), e2 && o2.length < 2 && (o2 = [e2.uuid])) : e2 && (o2 = ["page", e2.uuid]) : o2 = ["page", e2.uuid], o2 || e2 ? o2 : ["temp"];
83
84
  }
84
85
  function v(e2, t2, s2) {
85
86
  const i2 = E(t2, s2), r2 = e2.entity;
86
87
  if (null == r2.data.ID && null == r2.data.id) {
87
88
  let s3, l2, a2 = false;
88
89
  t2 && (s3 = t2.props.base ? t2.props.base : {}, l2 = t2.name, a2 = s3.multiple);
89
- const p2 = n(r2, i2);
90
+ const p2 = o(r2, i2);
90
91
  if (null == p2) {
91
92
  const t3 = s3 ? s3.defaultValue : null;
92
93
  if (t3) {
93
94
  const s4 = P(e2, t3, l2, a2);
94
- null != s4 && o(r2, i2, s4);
95
+ null != s4 && n(r2, i2, s4);
95
96
  }
96
97
  }
97
98
  }
98
99
  return i2;
99
100
  }
100
101
  function P(e2, t2, s2, i2) {
101
- let n2;
102
- if (t2 && (n2 = r(e2, t2), null != n2 && null != n2 && s2)) {
102
+ let o2;
103
+ if (t2 && (o2 = r(e2, t2), null != o2 && null != o2 && s2)) {
103
104
  let e3 = false;
104
- "checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = i2), e3 && (n2 = (n2 + "").split(","));
105
+ "checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = i2), e3 && (o2 = (o2 + "").split(","));
105
106
  }
106
- return n2;
107
+ return o2;
107
108
  }
108
109
  function M(e2, t2) {
109
110
  var _a, _b;
@@ -111,14 +112,14 @@ function M(e2, t2) {
111
112
  const s2 = [];
112
113
  if (e2.autoPermissions) for (const i2 of e2.autoPermissions) s2.push(t2.code + "." + i2.simpleCode);
113
114
  if (e2.functionCodes) {
114
- const i2 = e2.sourceTypes ? e2.sourceTypes : [], n2 = e2.functionCodes;
115
- for (let e3 = 0; e3 < n2.length; e3++) {
116
- const o2 = n2[e3], r2 = e3 < i2.length ? i2[e3] : "";
115
+ const i2 = e2.sourceTypes ? e2.sourceTypes : [], o2 = e2.functionCodes;
116
+ for (let e3 = 0; e3 < o2.length; e3++) {
117
+ const n2 = o2[e3], r2 = e3 < i2.length ? i2[e3] : "";
117
118
  let l2 = "";
118
- if ("service" == r2) l2 = o2;
119
- else if ("standard" === r2) l2 = t2.code + "." + o2;
119
+ if ("service" == r2) l2 = n2;
120
+ else if ("standard" === r2) l2 = t2.code + "." + n2;
120
121
  else {
121
- l2 = "custom" === k(o2, t2).type ? o2 : t2.code + "." + o2;
122
+ l2 = "custom" === k(n2, t2).type ? n2 : t2.code + "." + n2;
122
123
  }
123
124
  s2.includes(l2) || s2.push(l2);
124
125
  }
@@ -132,26 +133,26 @@ function k(e2, t2) {
132
133
  }
133
134
  return null;
134
135
  }
135
- function j(s2, i2, n2) {
136
- const o2 = s2.tableRuntimes, r2 = t(i2);
136
+ function j(s2, i2, o2) {
137
+ const n2 = s2.tableRuntimes, r2 = t(i2);
137
138
  let l2;
138
139
  const a2 = i2.code;
139
- return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: o2, additionalParamMapJson: l2, pageCode: a2, publishVersion: n2, pageType: s2.pageType });
140
+ return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: n2, additionalParamMapJson: l2, pageCode: a2, publishVersion: o2, pageType: s2.pageType });
140
141
  }
141
142
  const C = ["button-detail", "print-label"];
142
143
  function I(e2, t2, s2) {
143
144
  var _a, _b;
144
- const n2 = t2.props && t2.props.base ? t2.props.base.prop : null, o2 = p(e2);
145
+ const o2 = t2.props && t2.props.base ? t2.props.base.prop : null, n2 = p(e2);
145
146
  let r2 = false;
146
- if (o2 && C.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
147
+ if (n2 && C.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
147
148
  const s3 = e2.fieldPermissionMap.get("all_fields");
148
149
  false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", r2 = true);
149
150
  }
150
- if (n2) {
151
- const l2 = i(n2);
151
+ if (o2) {
152
+ const l2 = i(o2);
152
153
  if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[l2] || (e2.rules[l2] = []), t2.props.rules.forEach((e3) => {
153
154
  d(e3), !s2 && e3 && e3.required && (e3.required = false);
154
- }), e2.rules[l2] = t2.props.rules), o2 && !r2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
155
+ }), e2.rules[l2] = t2.props.rules), n2 && !r2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
155
156
  const i2 = e2.fieldPermissionMap.get(l2);
156
157
  if (!s2 && e2.workflowRules && (e2.workflowRules[l2] || e2.workflowRules.rules && e2.workflowRules.rules[l2])) {
157
158
  let t3 = e2.workflowRules[l2];
@@ -1,18 +1,18 @@
1
1
  import { ref as e } from "vue";
2
- import { defineStore as o } from "pinia";
3
- import a from "./eventBus.js";
4
- const t = o("pageContextUtil", () => {
5
- const o2 = e({ systemCode: "", systemVersion: -1 }), t2 = e(false), n = e(false), u = e(false), l = e(0), d = e(0);
6
- return { pageContext: o2, setPageContext: function(e2) {
7
- o2.value = e2;
2
+ import { defineStore as a } from "pinia";
3
+ import o from "./eventBus.js";
4
+ const t = a("pageContextUtil", () => {
5
+ const a2 = e({ systemCode: "", systemVersion: -1 }), t2 = e(false), n = e(false), u = e(false), l = e(0), v = e(0);
6
+ return { pageContext: a2, setPageContext: function(e2) {
7
+ a2.value = e2;
8
8
  }, countComponentsTotalNmber: function() {
9
9
  l.value++, t2.value = false, u.value = false;
10
10
  }, countComponentsLoadedNumber: function() {
11
- d.value++, u.value = false;
12
- }, componentsTotalNmber: l, componentsLoadedNumber: d, setPageComponentsLoaded: function(e2) {
13
- t2.value = e2, t2.value && n.value && (a.$emit("pageLoaded"), u.value = true);
11
+ v.value++, u.value = false;
12
+ }, componentsTotalNmber: l, componentsLoadedNumber: v, setPageComponentsLoaded: function(e2) {
13
+ t2.value = e2, t2.value && n.value && (o.$emit("pageLoaded"), u.value = true);
14
14
  }, setFormPageDataLoadState: function(e2) {
15
- n.value = e2, t2.value && n.value && (u.value = true);
15
+ n.value = e2, t2.value && n.value && (t2.value, n.value, u.value = true);
16
16
  }, formPageDataLoaded: n, pageComponentsLoaded: t2, restorePageLoadState: function() {
17
17
  t2.value = false, n.value = false, u.value = false;
18
18
  }, pageLoaded: u, getPageLoaded: function() {
@@ -19,7 +19,7 @@ function u(t2, e2) {
19
19
  }
20
20
  function l(t2, e2, i2, s2) {
21
21
  const r2 = !(!e2.props || !e2.props.base) && e2.props.base.showOperation, u2 = e2.btnList;
22
- r2 && u2 && u2.forEach((e3) => {
22
+ e2.btnList, r2 && u2 && u2.forEach((e3) => {
23
23
  const r3 = {}, u3 = Object.assign({}, e3.props.base);
24
24
  if ("custom" === e3.name ? u3.customControl = u3.name : u3.elementType = "el-button", void 0 === e3.isPermission || e3.isPermission + "" == "true") {
25
25
  const i3 = o(e3, t2);
@@ -1,9 +1,13 @@
1
- import { defineComponent as e, watch as l, resolveComponent as o, createBlock as a, createElementBlock as u, openBlock as r, withCtx as d, Fragment as n, renderList as p } from "vue";
2
- const t = e({ __name: "common-chart-header-group", props: { headerInfo: { type: Object, required: true } }, setup: (e2) => (l(e2.headerInfo, () => {
3
- }), (l2, t2) => {
4
- const h = o("el-checkbox"), f = o("el-checkbox-group"), m = o("el-radio"), V = o("el-radio-button"), b = o("el-radio-group");
5
- return "checkbox" == e2.headerInfo.groupComponent ? (r(), a(f, { key: 0, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t2[0] || (t2[0] = (l3) => e2.headerInfo.groupValue = l3) }, { default: d(() => [(r(true), u(n, null, p(e2.headerInfo.options, (e3) => (r(), a(h, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"])) : "radio" == e2.headerInfo.groupComponent ? (r(true), u(n, { key: 1 }, p(e2.headerInfo.options, (l3) => (r(), a(m, { modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t2[1] || (t2[1] = (l4) => e2.headerInfo.groupValue = l4), value: l3.value, label: l3.label }, null, 8, ["modelValue", "value", "label"]))), 256)) : (r(), a(b, { key: 2, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t2[2] || (t2[2] = (l3) => e2.headerInfo.groupValue = l3) }, { default: d(() => [(r(true), u(n, null, p(e2.headerInfo.options, (e3) => (r(), a(V, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"]));
6
- }) });
1
+ import { defineComponent as e, watch as l, resolveComponent as o, createBlock as a, createElementBlock as u, openBlock as r, withCtx as n, Fragment as d, renderList as p } from "vue";
2
+ const t = e({ __name: "common-chart-header-group", props: { headerInfo: { type: Object, required: true } }, setup(e2) {
3
+ const t2 = e2;
4
+ return l(t2.headerInfo, () => {
5
+ t2.headerInfo;
6
+ }), (l2, t3) => {
7
+ const h = o("el-checkbox"), f = o("el-checkbox-group"), m = o("el-radio"), V = o("el-radio-button"), b = o("el-radio-group");
8
+ return "checkbox" == e2.headerInfo.groupComponent ? (r(), a(f, { key: 0, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[0] || (t3[0] = (l3) => e2.headerInfo.groupValue = l3) }, { default: n(() => [(r(true), u(d, null, p(e2.headerInfo.options, (e3) => (r(), a(h, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"])) : "radio" == e2.headerInfo.groupComponent ? (r(true), u(d, { key: 1 }, p(e2.headerInfo.options, (l3) => (r(), a(m, { modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[1] || (t3[1] = (l4) => e2.headerInfo.groupValue = l4), value: l3.value, label: l3.label }, null, 8, ["modelValue", "value", "label"]))), 256)) : (r(), a(b, { key: 2, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[2] || (t3[2] = (l3) => e2.headerInfo.groupValue = l3) }, { default: n(() => [(r(true), u(d, null, p(e2.headerInfo.options, (e3) => (r(), a(V, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"]));
9
+ };
10
+ } });
7
11
  export {
8
12
  t as default
9
13
  };
@@ -3,12 +3,13 @@ import { Search as p } from "@element-plus/icons-vue";
3
3
  import g from "./common-chart-header-group.vue.js";
4
4
  import m from "./common-chart-header-breadcrumb.vue.js";
5
5
  import b from "./common-homepage-search.vue.js";
6
- import { setVariableValueWithProp as v, getValueFromSource as y, setValueForVariableName as w } from "../../../../utils/page-helper-util.js";
7
- const x = { class: "amb-widget-chart-header" }, O = { class: "amb-widget-chart-header-item" }, k = { class: "amb-widget-chart-header-item amb-widget-chart-header-center" }, j = { class: "amb-widget-chart-header-item" }, C = { key: 0, class: "amb-widget-chart-header-item" }, P = e({ __name: "common-chart-header", props: { headerInfo: { type: Object, required: true }, configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["drill-end"], setup(e2, { expose: P2, emit: _ }) {
6
+ import { setVariableValueWithProp as v, getValueFromSource as y, setValueForVariableName as O } from "../../../../utils/page-helper-util.js";
7
+ const w = { class: "amb-widget-chart-header" }, x = { class: "amb-widget-chart-header-item" }, k = { class: "amb-widget-chart-header-item amb-widget-chart-header-center" }, j = { class: "amb-widget-chart-header-item" }, C = { key: 0, class: "amb-widget-chart-header-item" }, P = e({ __name: "common-chart-header", props: { headerInfo: { type: Object, required: true }, configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["drill-end"], setup(e2, { expose: P2, emit: _ }) {
8
8
  const N = e2, D = o(null), A = o(), R = _;
9
9
  function S(e3) {
10
10
  const o2 = N.headerInfo.drillOptions.length;
11
- if (!(e3 >= o2)) {
11
+ if (e3 >= o2) N.headerInfo.drillOptions;
12
+ else {
12
13
  for (let r2 = o2 - 1; r2 >= e3; r2--) N.headerInfo.drillOptions.splice(r2, 1);
13
14
  q(e3);
14
15
  }
@@ -34,7 +35,7 @@ const x = { class: "amb-widget-chart-header" }, O = { class: "amb-widget-chart-h
34
35
  for (let e4 of o2.variables) {
35
36
  if (!e4.fieldName || !e4.variable) continue;
36
37
  const o3 = y(r2, e4.fieldName, void 0);
37
- w(N.pageContext.entity, e4.variable, o3);
38
+ O(N.pageContext.entity, e4.variable, o3);
38
39
  }
39
40
  }
40
41
  N.headerInfo.drillOptions || (N.headerInfo.drillOptions = []);
@@ -46,11 +47,12 @@ const x = { class: "amb-widget-chart-header" }, O = { class: "amb-widget-chart-h
46
47
  if (r2 + 1 >= N.headerInfo.options.length) {
47
48
  return F(o2 && e3.dataIndex < o2.length ? o2[e3.dataIndex] : void 0), void R("drill-end", e3);
48
49
  }
50
+ N.headerInfo.options;
49
51
  const n2 = N.headerInfo.options[r2], t2 = o2 && e3.dataIndex < o2.length ? o2[e3.dataIndex] : null, a2 = { fieldName: n2.target ? n2.target.replace(".", "_") : "", rawFieldName: n2.target ? n2.target : "", label: e3.name, value: e3.name, data: t2 };
50
52
  N.headerInfo.drillOptions.push(a2), q(r2 + 1);
51
53
  }, closeDrill: S }), (o2, v2) => {
52
- const y2 = r("el-icon"), w2 = r("el-tooltip");
53
- return t(), n("div", x, [a("div", O, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + "  ", 5), [[s, e2.headerInfo.title && (!e2.headerInfo.textAlign || "left" == e2.headerInfo.textAlign)]]), !e2.headerInfo.showDrill || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? l("", true) : (t(), d(m, { key: 0, ref_key: "drillObjRef", ref: D, headerInfo: e2.headerInfo, onCloseDrill: S }, null, 8, ["headerInfo"])), !e2.headerInfo.showGroup || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? l("", true) : (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"]))]), a("div", k, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + "  ", 5), [[s, e2.headerInfo.title && "center" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "center" == e2.headerInfo.groupPosition ? (t(), d(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : l("", true), e2.headerInfo.showGroup && "center" == e2.headerInfo.groupPosition ? (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : l("", true)]), a("div", j, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + "  ", 5), [[s, e2.headerInfo.title && "right" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "right" == e2.headerInfo.groupPosition ? (t(), d(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : l("", true), e2.headerInfo.showGroup && "right" == e2.headerInfo.groupPosition ? (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : l("", true)]), e2.pageContext.showHomepageSearch ? (t(), n("div", C, [c(w2, { content: "打开查询弹窗", effect: "light" }, { default: I(() => [c(y2, { onClick: G }, { default: I(() => [c(u(p))]), _: 1 })]), _: 1 }), c(b, { ref_key: "commonHomepageSearchRef", ref: A, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"])])) : l("", true)]);
54
+ const y2 = r("el-icon"), O2 = r("el-tooltip");
55
+ return t(), n("div", w, [a("div", x, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + "  ", 5), [[s, e2.headerInfo.title && (!e2.headerInfo.textAlign || "left" == e2.headerInfo.textAlign)]]), !e2.headerInfo.showDrill || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? l("", true) : (t(), d(m, { key: 0, ref_key: "drillObjRef", ref: D, headerInfo: e2.headerInfo, onCloseDrill: S }, null, 8, ["headerInfo"])), !e2.headerInfo.showGroup || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? l("", true) : (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"]))]), a("div", k, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + "  ", 5), [[s, e2.headerInfo.title && "center" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "center" == e2.headerInfo.groupPosition ? (t(), d(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : l("", true), e2.headerInfo.showGroup && "center" == e2.headerInfo.groupPosition ? (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : l("", true)]), a("div", j, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + "  ", 5), [[s, e2.headerInfo.title && "right" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "right" == e2.headerInfo.groupPosition ? (t(), d(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : l("", true), e2.headerInfo.showGroup && "right" == e2.headerInfo.groupPosition ? (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : l("", true)]), e2.pageContext.showHomepageSearch ? (t(), n("div", C, [c(O2, { content: "打开查询弹窗", effect: "light" }, { default: I(() => [c(y2, { onClick: G }, { default: I(() => [c(u(p))]), _: 1 })]), _: 1 }), c(b, { ref_key: "commonHomepageSearchRef", ref: A, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"])])) : l("", true)]);
54
56
  };
55
57
  } });
56
58
  export {
@@ -11,24 +11,24 @@ class ExpressionEvaluator {
11
11
  return this.evaluateExpression(o);
12
12
  }
13
13
  static createExpression(e, t, r) {
14
- const { propName: o, operator: a, propValue: n, leftBracket: s, rightBracket: l, joinSign: i, dataType: c } = t;
14
+ const { propName: o, operator: n, propValue: a, leftBracket: s, rightBracket: l, joinSign: i, dataType: c } = t;
15
15
  if (!o || "" === o) return "";
16
16
  const u = getValueFromVariable(e.entity, o, r);
17
- let p = `${s} ${this.getComparisonExpression(u, t, getValueFromVariable(e.entity, n, r))} ${l}`;
17
+ let p = `${s} ${this.getComparisonExpression(u, t, getValueFromVariable(e.entity, a, r))} ${l}`;
18
18
  return i && ("and" === i || "AND" === i ? p += "&&" : "or" !== i && "OR" !== i || (p += "||")), p.trim();
19
19
  }
20
20
  static getComparisonExpression(e, t, r) {
21
- const { dataType: o, variableIsNull: a } = t;
22
- let n = t.operator;
23
- n || (n = "EQ");
21
+ const { dataType: o, variableIsNull: n } = t;
22
+ let a = t.operator;
23
+ a || (a = "EQ");
24
24
  let s = this.parseValue(e, o);
25
25
  const l = this.parseValue(r, o);
26
- if (null == l && a) {
27
- if (null == s && (s = "null"), "null" === a) return `${s} === null`;
28
- if ("ignore" === a) return "1=1";
29
- if ("notequal" === a) return "1!=1";
26
+ if (null == l && n) {
27
+ if (null == s && (s = "null"), "null" === n) return `${s} === null`;
28
+ if ("ignore" === n) return "1=1";
29
+ if ("notequal" === n) return "1!=1";
30
30
  }
31
- switch (n) {
31
+ switch (a) {
32
32
  case "EQ":
33
33
  return `${s} === ${l}`;
34
34
  case "GT":
@@ -55,7 +55,7 @@ class ExpressionEvaluator {
55
55
  }
56
56
  return `[${l}].includes(${s})`;
57
57
  default:
58
- throw new Error(`比较符号不匹配: ${n}`);
58
+ throw new Error(`比较符号不匹配: ${a}`);
59
59
  }
60
60
  }
61
61
  static changeDataType(e) {
@@ -86,7 +86,7 @@ class ExpressionEvaluator {
86
86
  try {
87
87
  return eval(expression);
88
88
  } catch (e) {
89
- return false;
89
+ return console.error("表达式错误:", expression, e), false;
90
90
  }
91
91
  }
92
92
  }
@@ -114,39 +114,40 @@ function getSummaryDataColumn(e, t) {
114
114
  const r = {};
115
115
  return ((_a = e.props.summaries) == null ? void 0 : _a.dataColumn) && e.props.summaries.dataColumn.length > 0 && e.props.summaries.dataColumn.forEach((o) => {
116
116
  var _a2;
117
- const a = (_a2 = e.items) == null ? void 0 : _a2.find((e2) => o.prop === e2.props.base.prop);
118
- a && ("table" === t && a.props.base.tableSummary || "group" === t && a.props.base.groupSummary) && (r[o.prop] = o);
117
+ const n = (_a2 = e.items) == null ? void 0 : _a2.find((e2) => o.prop === e2.props.base.prop);
118
+ n && ("table" === t && n.props.base.tableSummary || "group" === t && n.props.base.groupSummary) && (r[o.prop] = o);
119
119
  }), r;
120
120
  }
121
121
  function summaryStatistics(e, t, r, o) {
122
- let a = "";
123
- const n = e.summaryMode, s = t.map((e2) => Number(e2[r])).filter((e2) => !Number.isNaN(e2));
124
- if (s.length > 0) if ("custom" === n) {
125
- const n2 = getCustomFunc(o, e.customFunc);
126
- if (n2) try {
127
- const e2 = n2.apply(n2, [{ data: t, prop: r }]);
128
- a = e2 ? ` ${e2}` : " N/A";
122
+ let n = "";
123
+ const a = e.summaryMode, s = t.map((e2) => Number(e2[r])).filter((e2) => !Number.isNaN(e2));
124
+ if (s.length > 0) if ("custom" === a) {
125
+ const a2 = getCustomFunc(o, e.customFunc);
126
+ if (a2) try {
127
+ const e2 = a2.apply(a2, [{ data: t, prop: r }]);
128
+ n = e2 ? ` ${e2}` : " N/A";
129
129
  } catch (e2) {
130
+ console.error("自定义函数脚本错误:", t, e2);
130
131
  }
131
- else a = " N/A";
132
- } else switch (n) {
132
+ else n = " N/A";
133
+ } else switch (a) {
133
134
  case "sum":
134
- a = ` ${s.reduce((e2, t2) => e2 + t2, 0)}`;
135
+ n = ` ${s.reduce((e2, t2) => e2 + t2, 0)}`;
135
136
  break;
136
137
  case "avg":
137
- a = " " + s.reduce((e2, t2) => e2 + t2, 0) / s.length;
138
+ n = " " + s.reduce((e2, t2) => e2 + t2, 0) / s.length;
138
139
  break;
139
140
  case "min":
140
- a = ` ${Math.min(...s)}`;
141
+ n = ` ${Math.min(...s)}`;
141
142
  break;
142
143
  case "max":
143
- a = ` ${Math.max(...s)}`;
144
+ n = ` ${Math.max(...s)}`;
144
145
  break;
145
146
  default:
146
- a = " N/A";
147
+ n = " N/A";
147
148
  }
148
- else a = " N/A";
149
- return a;
149
+ else n = " N/A";
150
+ return n;
150
151
  }
151
152
  function replacePlaceholders(e, t) {
152
153
  if (e) return e.replace(/\$\{row\.(\w+)\}/g, (e2, r) => Object.prototype.hasOwnProperty.call(t, r) ? t[r] : "");
@@ -156,31 +157,33 @@ function getHeaderCellStyleUtil(e, t, r) {
156
157
  const o = {};
157
158
  e.column.property && ((_a = t.titleStyle) == null ? void 0 : _a.forEach((t2) => {
158
159
  if (t2.field && t2.field.includes(e.column.property)) if (t2.scopeFunc) {
159
- const a2 = getCustomFunc(r.pageContext, t2.scopeFunc);
160
- if (a2) try {
161
- false !== a2.apply(a2, [{ item: t2, data: e }]) && copyStyle(o, t2);
162
- } catch (e2) {
160
+ const n2 = getCustomFunc(r.pageContext, t2.scopeFunc);
161
+ if (n2) try {
162
+ false !== n2.apply(n2, [{ item: t2, data: e }]) && copyStyle(o, t2);
163
+ } catch (r2) {
164
+ console.error("自定义函数脚本错误:", t2, e, r2);
163
165
  }
164
166
  } else copyStyle(o, t2);
165
167
  }));
166
- const a = getCellStyleUtil(e, t.cellTitleStyle, r);
167
- return a && Object.assign(o, a), o;
168
+ const n = getCellStyleUtil(e, t.cellTitleStyle, r);
169
+ return n && Object.assign(o, n), o;
168
170
  }
169
171
  function getRowStyleUtil(e, t, r) {
170
172
  const o = {};
171
173
  if (r.configure.style.rowStyle) for (let t2 = 0; t2 < r.configure.style.rowStyle.length; t2++) {
172
- const a = r.configure.style.rowStyle[t2];
173
- if (a.scopeFunc) {
174
- const t3 = getCustomFunc(r.pageContext, a.scopeFunc);
174
+ const n = r.configure.style.rowStyle[t2];
175
+ if (n.scopeFunc) {
176
+ const t3 = getCustomFunc(r.pageContext, n.scopeFunc);
175
177
  if (t3) try {
176
178
  const r2 = t3.apply(t3, [{ data: e }]);
177
- null != r2 && false !== r2 && copyStyle(o, a);
178
- } catch (e2) {
179
+ null != r2 && false !== r2 && copyStyle(o, n);
180
+ } catch (t4) {
181
+ console.error("自定义函数脚本错误:", e, t4);
179
182
  }
180
- } else if (a.matchingCondition) {
181
- const t3 = ExpressionEvaluator.evaluate(r.pageContext, a.matchingCondition, e.row);
182
- (t3 || void 0 === t3) && copyStyle(o, a);
183
- } else copyStyle(o, a);
183
+ } else if (n.matchingCondition) {
184
+ const t3 = ExpressionEvaluator.evaluate(r.pageContext, n.matchingCondition, e.row);
185
+ (t3 || void 0 === t3) && copyStyle(o, n);
186
+ } else copyStyle(o, n);
184
187
  }
185
188
  if (t && t.length > 0 && -1 !== t.indexOf(e.rowIndex)) {
186
189
  const e2 = {};
@@ -193,18 +196,19 @@ function getRowStyleUtil(e, t, r) {
193
196
  }
194
197
  function getCellStyleUtil(e, t, r) {
195
198
  const o = {};
196
- if (t) for (let a = 0; a < t.length; a++) {
197
- const n = t[a];
198
- if (isSetStyle(n)) if (n.scopeFunc) {
199
- const t2 = getCustomFunc(r.pageContext, n.scopeFunc);
199
+ if (t) for (let n = 0; n < t.length; n++) {
200
+ const a = t[n];
201
+ if (isSetStyle(a)) if (a.scopeFunc) {
202
+ const t2 = getCustomFunc(r.pageContext, a.scopeFunc);
200
203
  if (t2) try {
201
- false !== t2.apply(t2, [{ data: e }]) && copyStyle(o, n);
202
- } catch (e2) {
204
+ false !== t2.apply(t2, [{ data: e }]) && copyStyle(o, a);
205
+ } catch (t3) {
206
+ console.error("自定义函数脚本错误:", e, t3);
203
207
  }
204
- } else if (n.matchingCondition) {
205
- const t2 = ExpressionEvaluator.evaluate(r.pageContext, n.matchingCondition, e.row);
206
- (t2 || void 0 === t2) && copyStyle(o, n);
207
- } else copyStyle(o, n);
208
+ } else if (a.matchingCondition) {
209
+ const t2 = ExpressionEvaluator.evaluate(r.pageContext, a.matchingCondition, e.row);
210
+ (t2 || void 0 === t2) && copyStyle(o, a);
211
+ } else copyStyle(o, a);
208
212
  }
209
213
  return o;
210
214
  }
@@ -216,33 +220,33 @@ function copyStyle(e, t) {
216
220
  Object.assign(e, t.style), t.customStyle && Object.assign(e, JSON.parse(t.customStyle));
217
221
  }
218
222
  function rowDataToColumn(e, t, r) {
219
- const o = t.props.dataOrigin.groupField, a = t.props.dataOrigin.rowToColumn.titleColumns, n = t.props.dataOrigin.rowToColumn.dataColumns, s = [], l = {};
223
+ const o = t.props.dataOrigin.groupField, n = t.props.dataOrigin.rowToColumn.titleColumns, a = t.props.dataOrigin.rowToColumn.dataColumns, s = [], l = {};
220
224
  if (o && o.length > 0) e.forEach((e2) => {
221
225
  const t2 = o.map((t3) => e2[t3]).join("|");
222
226
  if (!l[t2]) {
223
227
  const r2 = {};
224
228
  o.forEach((t3) => r2[t3] = e2[t3]), l[t2] = r2, s.push(r2);
225
229
  }
226
- n.forEach((r2) => {
227
- const o2 = `${a.map((t3) => e2[t3]).join("")}${r2}`;
230
+ a.forEach((r2) => {
231
+ const o2 = `${n.map((t3) => e2[t3]).join("")}${r2}`;
228
232
  l[t2][o2] = e2[r2];
229
233
  });
230
234
  });
231
235
  else {
232
236
  const t2 = [];
233
237
  e.forEach((e2) => {
234
- a.forEach((r2) => {
238
+ n.forEach((r2) => {
235
239
  e2[r2] && t2.push(e2[r2]);
236
240
  });
237
- }), n.forEach((t3) => {
238
- const o2 = {}, n2 = r.find((e2) => {
241
+ }), a.forEach((t3) => {
242
+ const o2 = {}, a2 = r.find((e2) => {
239
243
  var _a, _b;
240
244
  return ((_b = (_a = e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop) === t3;
241
245
  });
242
- n2 && (o2.$GroupColumn = n2.props.base.name), e.forEach((e2) => {
243
- a.forEach((r2) => {
244
- const a2 = e2[r2], n3 = e2[t3];
245
- o2[a2] = n3;
246
+ a2 && (o2.$GroupColumn = a2.props.base.name), e.forEach((e2) => {
247
+ n.forEach((r2) => {
248
+ const n2 = e2[r2], a3 = e2[t3];
249
+ o2[n2] = a3;
246
250
  });
247
251
  }), s.push(o2);
248
252
  });
@@ -250,9 +254,9 @@ function rowDataToColumn(e, t, r) {
250
254
  return s;
251
255
  }
252
256
  function colDataToRow(e, t) {
253
- const r = t.props.dataOrigin.groupField, o = t.props.dataOrigin.columnToRow.titleColumns, a = t.props.dataOrigin.columnToRow.dataColumns, n = t.props.dataOrigin.columnToRow.transColumns, s = t.props.dataOrigin.columnToRow.dataColumnsMapping;
257
+ const r = t.props.dataOrigin.groupField, o = t.props.dataOrigin.columnToRow.titleColumns, n = t.props.dataOrigin.columnToRow.dataColumns, a = t.props.dataOrigin.columnToRow.transColumns, s = t.props.dataOrigin.columnToRow.dataColumnsMapping;
254
258
  if (0 === e.length) return e;
255
- const l = [], i = groupBy(e, r), c = a.reduce((e2, t2) => t2.columns.length > e2.columns.length ? t2 : e2, a[0]), u = a.reduce((e2, t2) => (t2.columns.forEach((r2) => {
259
+ const l = [], i = groupBy(e, r), c = n.reduce((e2, t2) => t2.columns.length > e2.columns.length ? t2 : e2, n[0]), u = n.reduce((e2, t2) => (t2.columns.forEach((r2) => {
256
260
  e2[r2] = t2.prop;
257
261
  }), e2), {});
258
262
  return i.forEach((e2) => {
@@ -260,14 +264,14 @@ function colDataToRow(e, t) {
260
264
  const i2 = c.prop, p = {};
261
265
  if (r.forEach((t3) => {
262
266
  p[t3] = e2[t3];
263
- }), p[i2] = e2[t2], a.length > 1) {
267
+ }), p[i2] = e2[t2], n.length > 1) {
264
268
  const r2 = s.find((e3) => e3.props.includes(t2));
265
269
  r2 && r2.props.length > 1 && r2.props.forEach((r3) => {
266
270
  r3 !== t2 && u[r3] && (p[u[r3]] = e2[r3]);
267
271
  });
268
272
  }
269
273
  o.forEach((e3) => {
270
- const r2 = n.filter((t3) => t3.relatedTitle === e3.prop);
274
+ const r2 = a.filter((t3) => t3.relatedTitle === e3.prop);
271
275
  let o2 = false;
272
276
  r2 && r2.length > 0 && r2.forEach((r3) => {
273
277
  if (r3.columns.includes(t2)) return p[e3.prop] = r3.label, void (o2 = true);
@@ -277,25 +281,25 @@ function colDataToRow(e, t) {
277
281
  }), l;
278
282
  }
279
283
  function getColumnToRowTableConfig(e) {
280
- const t = e.items, r = e.props.dataOrigin.groupField, o = e.props.dataOrigin.columnToRow.titleColumns, a = e.props.dataOrigin.columnToRow.dataColumns, n = [];
284
+ const t = e.items, r = e.props.dataOrigin.groupField, o = e.props.dataOrigin.columnToRow.titleColumns, n = e.props.dataOrigin.columnToRow.dataColumns, a = [];
281
285
  r && r.length > 0 && r.forEach((e2) => {
282
286
  if (t) {
283
287
  const r2 = t.find((t2) => t2.props.base.prop === e2);
284
- r2 && n.push(r2);
288
+ r2 && a.push(r2);
285
289
  }
286
290
  });
287
- return [...o, ...a].forEach((e2) => {
291
+ return [...o, ...n].forEach((e2) => {
288
292
  if (t) {
289
293
  const r2 = t.find((t2) => t2.props.base.prop === e2);
290
- r2 ? n.push(r2) : n.push({ uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e2.prop, name: e2.title, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: "string" }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } });
294
+ r2 ? a.push(r2) : a.push({ uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e2.prop, name: e2.title, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: "string" }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } });
291
295
  }
292
- }), n;
296
+ }), a;
293
297
  }
294
298
  function groupBy(e, t) {
295
299
  const r = {};
296
300
  return e.forEach((e2) => {
297
301
  const o = t.map((t2) => e2[t2]).join("|");
298
- r[o] || (r[o] = { ...e2, records: [] }, t.forEach((t2, a) => {
302
+ r[o] || (r[o] = { ...e2, records: [] }, t.forEach((t2, n) => {
299
303
  r[o][t2] = e2[t2];
300
304
  })), r[o].records.push(e2);
301
305
  }), Object.values(r).map((e2) => ({ ...e2, records: void 0 }));
@@ -323,7 +327,7 @@ function computeFormula(itemConfs, datas, entity) {
323
327
  r += Number(e2[t]);
324
328
  });
325
329
  } catch (e2) {
326
- r = 0;
330
+ console.error("计算错误:", e2), r = 0;
327
331
  }
328
332
  totalValueMap[e] = r;
329
333
  } 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));
@@ -335,7 +339,7 @@ function computeFormula(itemConfs, datas, entity) {
335
339
  try {
336
340
  data[key] = eval(expr);
337
341
  } catch (e) {
338
- data[key] = 0;
342
+ console.error(itemConfs[key] + " 计算错误, 替换后表达式为:" + expr, e), data[key] = 0;
339
343
  }
340
344
  });
341
345
  });
@@ -343,19 +347,19 @@ function computeFormula(itemConfs, datas, entity) {
343
347
  function getFieldName(e) {
344
348
  return e.substring(6, e.length - 1);
345
349
  }
346
- function formatColContent(e, t, r, o, a) {
347
- const n = e[r.props.base.prop];
350
+ function formatColContent(e, t, r, o, n) {
351
+ const a = e[r.props.base.prop];
348
352
  switch (t.type) {
349
353
  case "number":
350
- return formatNumber(n, t);
354
+ return formatNumber(a, t);
351
355
  case "currency":
352
- return formatCurrency(n, t);
356
+ return formatCurrency(a, t);
353
357
  case "percent":
354
- return formatPercent(n, t);
358
+ return formatPercent(a, t);
355
359
  case "custom":
356
- return formatCustomFunc(e, t, r, o, a);
360
+ return formatCustomFunc(e, t, r, o, n);
357
361
  default:
358
- return n;
362
+ return a;
359
363
  }
360
364
  }
361
365
  function formatNumber(e, t) {
@@ -370,12 +374,13 @@ function formatPercent(e, t) {
370
374
  let r = e;
371
375
  return r || (r = 0), t.decimalDigit && (r = Number(e).toFixed(t.decimalDigit)), r + " %";
372
376
  }
373
- function formatCustomFunc(e, t, r, o, a) {
374
- const n = getCustomFunc(o, t.customFunc);
375
- if (n) {
377
+ function formatCustomFunc(e, t, r, o, n) {
378
+ const a = getCustomFunc(o, t.customFunc);
379
+ if (a) {
376
380
  try {
377
- return n.apply(n, [{ pageContext: o, configureObj: a, row: e, prop: r.props.base.prop }]);
378
- } catch (e2) {
381
+ return a.apply(a, [{ pageContext: o, configureObj: n, row: e, prop: r.props.base.prop }]);
382
+ } catch (t2) {
383
+ console.error("自定义函数脚本错误:", e, t2);
379
384
  }
380
385
  return "";
381
386
  }