super-page-runtime 2.3.4-sit1 → 2.3.5-rc1

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 (43) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +35 -27
  2. package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
  3. package/dist/es/components/runtime/utils/common-util.js +62 -47
  4. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  5. package/dist/es/components/runtime/utils/events/print-label.js +26 -25
  6. package/dist/es/components/runtime/utils/events/standard-event.js +21 -19
  7. package/dist/es/components/runtime/utils/events/validator-util.js +23 -23
  8. package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -1
  9. package/dist/es/components/runtime/utils/page-init-util.js +60 -48
  10. package/dist/es/components/runtime/utils/page-store.js +10 -10
  11. package/dist/es/components/runtime/utils/table-utils.d.ts +14 -0
  12. package/dist/es/components/runtime/utils/table-utils.js +57 -32
  13. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  14. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
  15. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +20 -20
  16. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +8 -1
  17. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +15 -10
  18. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +6 -6
  19. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +3 -2
  20. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +8 -4
  21. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -25
  22. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
  23. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
  24. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +10 -9
  25. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +48 -48
  26. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +24 -15
  27. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +1 -1
  28. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +29 -29
  29. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +23 -22
  30. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
  31. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
  32. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +50 -49
  33. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
  34. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -0
  35. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -0
  36. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +69 -67
  37. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  38. package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
  39. package/dist/es/components/runtime/views/super-page.vue.d.ts +2 -2
  40. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  41. package/dist/es/components/runtime/views/super-page.vue2.js +12 -11
  42. package/dist/es/style.css +82 -82
  43. package/package.json +2 -2
@@ -5,59 +5,59 @@ import { ElLoading as y, ElMessage as C } from "element-plus";
5
5
  import S from "agilebuilder-ui/src/utils/request";
6
6
  import "agilebuilder-ui/src/utils/common-util";
7
7
  import "agilebuilder-ui/src/utils/util";
8
- import "agilebuilder-ui/src/utils/auth";
8
+ import "async-validator";
9
9
  import "../../../../utils/global-refs.js";
10
10
  import "../../../../utils/eventBus.js";
11
- import "axios";
12
- import "async-validator";
13
11
  import "../../../../utils/page-store.js";
14
12
  import "agilebuilder-ui/src/utils/i18n-util";
15
13
  import "vue-i18n";
14
+ import "agilebuilder-ui/src/utils/auth";
15
+ import "axios";
16
16
  import "../../../../utils/events/print-label.js";
17
- const b = { style: { overflow: "auto", height: "calc(100vh - 140px)" }, ref: "dialogBody" }, O = { class: "dialog-footer" }, x = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
18
- } } }, setup(e2, { expose: x2 }) {
19
- const N = e2, _ = t(false), J = t({}), j = t(0);
17
+ const _ = { style: { overflow: "auto", height: "calc(100vh - 140px)" }, ref: "dialogBody" }, b = { class: "dialog-footer" }, O = e({ __name: "common-homepage-search", props: { configure: { type: Object, required: true }, pageContext: { type: Object, default: () => {
18
+ } } }, setup(e2, { expose: O2 }) {
19
+ const x = e2, N = t(false), J = t({}), j = t(0);
20
20
  let I;
21
21
  o(() => {
22
22
  I = setTimeout(() => {
23
- J.value = JSON.parse(JSON.stringify(N.pageContext.entity));
23
+ J.value = JSON.parse(JSON.stringify(x.pageContext.entity));
24
24
  }, 200);
25
25
  }), i(() => {
26
26
  I && clearTimeout(I);
27
27
  });
28
28
  const k = t([]), w = () => {
29
- _.value = false;
29
+ N.value = false;
30
30
  }, T = () => {
31
31
  const e3 = y.service({ lock: true, text: "Loading", background: "rgba(0, 0, 0, 0.7)" });
32
- v(N.pageContext, N.pageContext.initChartServiceConfigs, null, false).then(() => {
33
- _.value = false;
32
+ v(x.pageContext, x.pageContext.initChartServiceConfigs, null, false).then(() => {
33
+ N.value = false;
34
34
  }).finally(() => {
35
- _.value = false, e3.close();
35
+ N.value = false, e3.close();
36
36
  });
37
37
  };
38
38
  function H() {
39
- N.pageContext.entity = JSON.parse(JSON.stringify(J.value)), j.value++;
39
+ x.pageContext.entity = JSON.parse(JSON.stringify(J.value)), j.value++;
40
40
  }
41
41
  function A() {
42
42
  const e3 = {};
43
- N.pageContext.variables.forEach((t3) => {
43
+ x.pageContext.variables.forEach((t3) => {
44
44
  const o3 = "${page." + t3.name + "}";
45
- e3[o3] = h(N.pageContext.entity, o3, null);
45
+ e3[o3] = h(x.pageContext.entity, o3, null);
46
46
  });
47
47
  let t2 = window.localStorage.getItem("HOME_MY_CHARTS_CONDITIONS"), o2 = {};
48
- t2 && (o2 = JSON.parse(t2)), o2[N.configure.homeChartSettingUserId] = e3;
48
+ t2 && (o2 = JSON.parse(t2)), o2[x.configure.homeChartSettingUserId] = e3;
49
49
  const i2 = JSON.stringify(e3);
50
- window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), J.value = JSON.parse(JSON.stringify(N.pageContext.entity)), S.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: N.configure.homeChartSettingUserId, searchConditionsJson: i2 }).then((e4) => {
50
+ window.localStorage.setItem("HOME_MY_CHARTS_CONDITIONS", JSON.stringify(o2)), J.value = JSON.parse(JSON.stringify(x.pageContext.entity)), S.post(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-settings/search-conditions", { id: x.configure.homeChartSettingUserId, searchConditionsJson: i2 }).then((e4) => {
51
51
  C.success("保存成功"), T();
52
52
  });
53
53
  }
54
- return x2({ openSearch: () => {
55
- _.value = true, k.value = N.configure.pushHomepage.searchConditions;
54
+ return O2({ openSearch: () => {
55
+ N.value = true, k.value = x.configure.pushHomepage.searchConditions;
56
56
  } }), (t2, o2) => {
57
57
  const i2 = l("el-empty"), v2 = l("el-form"), h2 = l("el-button"), y2 = l("el-dialog");
58
- return r(), a(y2, { modelValue: _.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => _.value = e3), title: "筛选", close: w, "append-to-body": "", fullscreen: "", top: "40vh", append: "", width: "70%", draggable: "" }, { default: n(() => [u("div", b, [k.value && 0 !== k.value.length ? c("", true) : (r(), a(i2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (r(), a(v2, { key: j.value }, { default: n(() => [(r(true), g(m, null, d(k.value, (t3) => (r(), a(f, { key: t3.uuid, configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"]))), 128))]), _: 1 }))], 512)]), footer: n(() => [u("div", O, [s(h2, { type: "primary", onClick: T }, { default: n(() => o2[1] || (o2[1] = [p(" 确定 ")])), _: 1 }), s(h2, { type: "default", onClick: H }, { default: n(() => o2[2] || (o2[2] = [p("重置")])), _: 1 }), s(h2, { type: "primary", onClick: A }, { default: n(() => o2[3] || (o2[3] = [p(" 保存为默认条件 ")])), _: 1 })])]), _: 1 }, 8, ["modelValue"]);
58
+ return r(), a(y2, { modelValue: N.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => N.value = e3), title: "筛选", close: w, "append-to-body": "", fullscreen: "", top: "40vh", append: "", width: "70%", draggable: "" }, { default: n(() => [u("div", _, [k.value && 0 !== k.value.length ? c("", true) : (r(), a(i2, { key: 0, description: "未设置筛选条件", "image-size": 50 })), (r(), a(v2, { key: j.value }, { default: n(() => [(r(true), g(m, null, d(k.value, (t3) => (r(), a(f, { key: t3.uuid, configure: t3, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"]))), 128))]), _: 1 }))], 512)]), footer: n(() => [u("div", b, [s(h2, { type: "primary", onClick: T }, { default: n(() => o2[1] || (o2[1] = [p(" 确定 ", -1)])), _: 1, __: [1] }), s(h2, { type: "default", onClick: H }, { default: n(() => o2[2] || (o2[2] = [p("重置", -1)])), _: 1, __: [2] }), s(h2, { type: "primary", onClick: A }, { default: n(() => o2[3] || (o2[3] = [p(" 保存为默认条件 ", -1)])), _: 1, __: [3] })])]), _: 1 }, 8, ["modelValue"]);
59
59
  };
60
60
  } });
61
61
  export {
62
- x as default
62
+ O as default
63
63
  };
@@ -12,7 +12,14 @@ type Condition = {
12
12
  };
13
13
  type Data = Record<string, any>;
14
14
  export declare class ExpressionEvaluator {
15
- static evaluate(pageContext: PageContext, conditions: Condition[], data: Data): boolean;
15
+ /**
16
+ *
17
+ * @param pageContext 页面上下文
18
+ * @param conditions 条件集合
19
+ * @param data 数据对象,一般是行数据
20
+ * @returns
21
+ */
22
+ static evaluate(pageContext: PageContext, conditions: Condition[], data?: Data): boolean;
16
23
  private static createExpression;
17
24
  private static getComparisonExpression;
18
25
  private static changeDataType;
@@ -57,24 +57,24 @@ class ExpressionEvaluator {
57
57
  return t;
58
58
  }
59
59
  static parseValue(e, t) {
60
- switch (t = this.changeDataType(t)) {
60
+ if (t = this.changeDataType(t), null == e) return e;
61
+ switch (t) {
61
62
  case "number":
62
63
  return getNumberValue(e);
63
64
  case "date":
64
65
  return new Date(e).getTime();
65
66
  case "string":
67
+ default:
66
68
  return `"${e}"`;
67
69
  case "boolean":
68
70
  return "true" === e || true === e || 1 === e;
69
- default:
70
- throw new Error(`数据类型解析错误: ${t}`);
71
71
  }
72
72
  }
73
73
  static evaluateExpression(expression) {
74
74
  try {
75
75
  return eval(expression);
76
76
  } catch (e) {
77
- return false;
77
+ return console.error("表达式错误:", expression, e), false;
78
78
  }
79
79
  }
80
80
  }
@@ -115,6 +115,7 @@ function summaryStatistics(e, t, r, o) {
115
115
  const e2 = n2.apply(n2, [{ data: t, prop: r }]);
116
116
  a = e2 ? ` ${e2}` : " N/A";
117
117
  } catch (e2) {
118
+ console.error("自定义函数脚本错误:", t, e2);
118
119
  }
119
120
  else a = " N/A";
120
121
  } else switch (n) {
@@ -147,7 +148,8 @@ function getHeaderCellStyleUtil(e, t, r) {
147
148
  const a2 = getCustomFunc(r.pageContext, t2.scopeFunc);
148
149
  if (a2) try {
149
150
  false !== a2.apply(a2, [{ item: t2, data: e }]) && copyStyle(o, t2);
150
- } catch (e2) {
151
+ } catch (r2) {
152
+ console.error("自定义函数脚本错误:", t2, e, r2);
151
153
  }
152
154
  } else copyStyle(o, t2);
153
155
  }));
@@ -163,7 +165,8 @@ function getRowStyleUtil(e, t, r) {
163
165
  if (t3) try {
164
166
  const r2 = t3.apply(t3, [{ data: e }]);
165
167
  null != r2 && false !== r2 && copyStyle(o, a);
166
- } catch (e2) {
168
+ } catch (t4) {
169
+ console.error("自定义函数脚本错误:", e, t4);
167
170
  }
168
171
  } else if (a.matchingCondition) {
169
172
  const t3 = ExpressionEvaluator.evaluate(r.pageContext, a.matchingCondition, e.row);
@@ -187,7 +190,8 @@ function getCellStyleUtil(e, t, r) {
187
190
  const t2 = getCustomFunc(r.pageContext, n.scopeFunc);
188
191
  if (t2) try {
189
192
  false !== t2.apply(t2, [{ data: e }]) && copyStyle(o, n);
190
- } catch (e2) {
193
+ } catch (t3) {
194
+ console.error("自定义函数脚本错误:", e, t3);
191
195
  }
192
196
  } else if (n.matchingCondition) {
193
197
  const t2 = ExpressionEvaluator.evaluate(r.pageContext, n.matchingCondition, e.row);
@@ -311,7 +315,7 @@ function computeFormula(itemConfs, datas, entity) {
311
315
  r += Number(e2[t]);
312
316
  });
313
317
  } catch (e2) {
314
- r = 0;
318
+ console.error("计算错误:", e2), r = 0;
315
319
  }
316
320
  totalValueMap[e] = r;
317
321
  } 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));
@@ -323,7 +327,7 @@ function computeFormula(itemConfs, datas, entity) {
323
327
  try {
324
328
  data[key] = eval(expr);
325
329
  } catch (e) {
326
- data[key] = 0;
330
+ console.error(itemConfs[key] + " 计算错误, 替换后表达式为:" + expr, e), data[key] = 0;
327
331
  }
328
332
  });
329
333
  });
@@ -363,7 +367,8 @@ function formatCustomFunc(e, t, r, o, a) {
363
367
  if (n) {
364
368
  try {
365
369
  return n.apply(n, [{ pageContext: o, configureObj: a, row: e, prop: r.props.base.prop }]);
366
- } catch (e2) {
370
+ } catch (t2) {
371
+ console.error("自定义函数脚本错误:", e, t2);
367
372
  }
368
373
  return "";
369
374
  }
@@ -1,26 +1,26 @@
1
1
  import { defineComponent as o, ref as e, resolveComponent as t, createBlock as r, openBlock as p, withCtx as l, createElementBlock as s, Fragment as n, createTextVNode as a, toDisplayString as u, resolveDynamicComponent as i, createVNode as c, createCommentVNode as m, createElementVNode as f, normalizeClass as g } from "vue";
2
2
  import "agilebuilder-ui/src/utils/common-util";
3
3
  import "agilebuilder-ui/src/utils/util";
4
+ import { formatColContent as d } from "./chart-table-util.js";
4
5
  import "agilebuilder-ui/src/utils/request";
5
6
  import "element-plus";
6
7
  import "agilebuilder-ui/src/utils/auth";
7
8
  import "../../../../utils/global-refs.js";
8
- import d from "../../../../utils/eventBus.js";
9
+ import y from "../../../../utils/eventBus.js";
9
10
  import "axios";
10
11
  import "dayjs";
11
12
  import "agilebuilder-ui/src/utils/calculator/calculator-util";
12
13
  import "async-validator";
14
+ import { expressJump as b } from "../../../../utils/table-utils.js";
13
15
  import "../../../../utils/events/print-label.js";
14
- import { expressJump as y } from "../../../../utils/table-utils.js";
15
16
  import "../../../../utils/page-store.js";
16
- import { formatColContent as b } from "./chart-table-util.js";
17
17
  const k = { key: 0 }, w = { key: 1 }, h = { key: 1 }, x = { key: 2 }, C = o({ __name: "normal-column", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) }, column: { type: Object, default: () => ({}) } }, setup(o2) {
18
18
  const C2 = o2, j = e(false);
19
19
  let v = null;
20
20
  function O(o3, e2, t2, r2) {
21
21
  }
22
22
  function _(o3) {
23
- const e2 = y(C2.pageContext, C2.configure, C2.column.linkPage, o3);
23
+ const e2 = b(C2.pageContext, C2.configure, C2.column.linkPage, o3);
24
24
  let t2 = false;
25
25
  return e2 && (t2 = e2.show, v = e2.toPage), t2;
26
26
  }
@@ -29,11 +29,11 @@ const k = { key: 0 }, w = { key: 1 }, h = { key: 1 }, x = { key: 2 }, C = o({ __
29
29
  const e2 = C2.pageContext.code + "_", t2 = JSON.parse(JSON.stringify(v));
30
30
  t2.base = { successOperation: "closeWindow" };
31
31
  const r2 = { id: o3.id ? o3.id : o3.ID, selections: [o3] };
32
- d.$emit(e2 + "open-dialog", { pageContext: C2.pageContext, configureObj: { props: t2 }, eventParams: r2 });
32
+ y.$emit(e2 + "open-dialog", { pageContext: C2.pageContext, configureObj: { props: t2 }, eventParams: r2 });
33
33
  }
34
34
  }
35
35
  function T(o3, e2) {
36
- return b(o3, e2, C2.column, C2.pageContext, C2.configure);
36
+ return d(o3, e2, C2.column, C2.pageContext, C2.configure);
37
37
  }
38
38
  return C2.column.linkPage && C2.column.linkPage.length > 0 && (j.value = true), (e2, d2) => {
39
39
  const y2 = t("el-table-column"), b2 = t("el-progress"), C3 = t("el-tag"), v2 = t("el-link");
@@ -178,8 +178,9 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
178
178
  return o2.forEach((e4, o3) => {
179
179
  if (ae.value[e4.property]) {
180
180
  const t2 = ae.value[e4.property].label;
181
- r2[o3] = y("div", {}, [J(t2, n2)]);
182
- } else if (ue.value[e4.property]) {
181
+ return void (r2[o3] = y("div", {}, [J(t2, n2)]));
182
+ }
183
+ if (ue.value[e4.property]) {
183
184
  const t2 = n2.filter((e5, o4) => !le.includes(o4));
184
185
  r2[o3] = D(ue.value[e4.property], t2, e4.property, B.pageContext);
185
186
  }
@@ -1,21 +1,25 @@
1
+ import { Component, PageContext } from '../../../utils/interfaces/page-design-types';
2
+
1
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
4
  configure: {
3
- type: ObjectConstructor;
5
+ type: () => Component;
4
6
  required: true;
5
7
  };
6
8
  pageContext: {
7
- type: ObjectConstructor;
9
+ type: () => PageContext;
10
+ required: true;
8
11
  };
9
12
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
13
  close: (...args: any[]) => void;
11
14
  export: (...args: any[]) => void;
12
15
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
13
16
  configure: {
14
- type: ObjectConstructor;
17
+ type: () => Component;
15
18
  required: true;
16
19
  };
17
20
  pageContext: {
18
- type: ObjectConstructor;
21
+ type: () => PageContext;
22
+ required: true;
19
23
  };
20
24
  }>> & Readonly<{
21
25
  onClose?: (...args: any[]) => any;
@@ -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;
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;
1
+ import { defineComponent as e, ref as t, onMounted as l, resolveComponent as a, createBlock as o, openBlock as u, withCtx as p, createVNode as n, createTextVNode as s, toDisplayString as r } from "vue";
2
+ import { packageTemplateFiles as i } from "../../../utils/common-util.js";
3
+ import { ElMessage as m } from "element-plus";
4
+ const c = "${", d = "}", g = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["export", "close"], setup(e2, { emit: g2 }) {
5
+ var _a, _b;
6
+ const f = e2, b = t(false), v = g2, h = t([]), x = t([]), y = (_a = f.configure.props) == null ? void 0 : _a.base, w = (_b = f.pageContext) == null ? void 0 : _b.entity.data;
7
+ function N(e3) {
8
+ let t2, l2, a2 = e3;
9
+ const o2 = a2.indexOf(c), u2 = a2.indexOf(d);
10
+ return -1 !== o2 && -1 !== u2 ? (o2 > u2 ? a2 = a2.substring(0, u2) + a2.substring(u2 + 1) : (t2 = a2.substring(o2 + 2, u2), l2 = a2.substring(o2, u2 + 1), x.value.push(t2), x.value, a2 = a2.replace(l2, "")), N(a2)) : x.value;
9
11
  }
10
- function y() {
11
- f("close");
12
+ function O(e3) {
13
+ v("export", f.configure, e3);
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));
21
- });
15
+ function _() {
16
+ v("close");
17
+ }
18
+ return l(() => {
19
+ y.templateFiles && y.templateFiles.length > 0 ? h.value = i(y.templateFiles, f.pageContext, f.configure) : y.templateUuid && y.templateName && h.value.push({ templateUuid: y.templateUuid, templateName: y.templateName }), h.value.forEach((e3) => {
20
+ e3 && e3.templateName && (e3.templateName = function(e4) {
21
+ const t2 = N(e4);
22
+ return t2.forEach((t3) => {
23
+ const l2 = c + t3 + d;
24
+ let a2;
25
+ -1 !== e4.indexOf(l2) && Object.prototype.hasOwnProperty.call(w, t3) && (a2 = w[t3] ? w[t3] : "", e4 = e4.replace(l2, a2));
26
+ }), e4;
27
+ }(e3.templateName));
28
+ }), h.value && 0 !== h.value.length || (m({ message: "无符合条件可导出的模板!", type: "warning" }), v("close")), 1 === (h == null ? void 0 : h.value.length) ? (O(h.value[0]), v("close")) : b.value = true;
22
29
  }), (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"]);
30
+ const l2 = a("el-table-column"), i2 = a("el-button"), m2 = a("el-table"), c2 = a("el-dialog");
31
+ return u(), o(c2, { modelValue: b.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => b.value = e4), "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), onClose: _ }, { default: p(() => [n(m2, { data: h.value, style: { width: "100%" } }, { default: p(() => [n(l2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: p((e4) => [s(r(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), n(l2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: p((t3) => [n(i2, { type: "text", size: "small", onClick: (e4) => O(t3.row) }, { default: p(() => [s(r(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["modelValue", "title"]);
28
32
  };
29
33
  } });
30
34
  export {
31
- c as default
35
+ g as default
32
36
  };
@@ -19,6 +19,7 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
19
19
  B.value = l2 ?? 0, R(n2 || i2 || false, e3);
20
20
  }
21
21
  } catch (e3) {
22
+ console.error(e3);
22
23
  }
23
24
  }, R = (e3, t2) => {
24
25
  var _a;
@@ -55,6 +56,7 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
55
56
  })();
56
57
  b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", z)), window.addEventListener("resize", L), S();
57
58
  } catch (e3) {
59
+ console.error(e3);
58
60
  }
59
61
  });
60
62
  }, 100);
@@ -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 {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as e, ref as t, onMounted as n, watch as o, onUnmounted as i, resolveComponent as a, createElementBlock as l, openBlock as r, unref as u, createVNode as s } from "vue";
2
2
  import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as w, rowDblClick as S, headerClick as C, getEventNameByType as y, getEventFuncByType as x, getHandleEvent as E } from "../../../../utils/events/event-util.js";
3
- import { getBaseUrl as D, getListCode as T, getRealRestApiPath as O, isWorkflowPage as R, isVariableInvalidValue as k } from "../../../../utils/common-util.js";
3
+ import { getBaseUrl as D, getListCode as T, getRealRestApiPath as R, isWorkflowPage as O, isVariableInvalidValue as k } from "../../../../utils/common-util.js";
4
4
  import { getAdditionalParamMap as I, getSaveFormRequestWithRow as V, standardEvents as j } from "../../../../utils/events/standard-event.js";
5
5
  import { isPromise as N } from "agilebuilder-ui/src/utils/common-util";
6
6
  import { getOperationButtons as B, popupToPage as P } from "../../../../utils/table-utils.js";
@@ -22,7 +22,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
22
22
  const e3 = Y.systemCode, t2 = Y.code;
23
23
  let n2 = J.props && J.props.dataOrigin && "[]" !== J.props.dataOrigin.sqlFilterCondition ? J.props.dataOrigin.sqlFilterCondition : null;
24
24
  null == n2 && (n2 = []);
25
- const o2 = { isSql: true, optionTableHeight: 0, rowKeyProp: J.props.dataOrigin.principalLinkage, extraParam: { beanName: Y.beanName, functionCode: t2 + ".listData", tableName: ne, systemCode: e3, pageCode: Y.code, pageVersion: Y.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: Se, esc: De }, indexContinuous: !(!J.props || !J.props.otherSettings) && J.props.otherSettings.serialNumberContinuous, initSearch: !J.props || false !== J.props.dataOrigin.initializationQuery, resizeHeight: je, pageCode: Y.code, pageVersion: Y.version, additionalParamMap: I(Y), showOverflowTooltip: !(!J.props || !J.props.otherSettings || void 0 !== J.props.otherSettings.isBreakLine && false !== J.props.otherSettings.isBreakLine), isEnableEnterEvent: J.props && J.props.otherSettings && J.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(J.props && J.props.otherSettings && J.props.otherSettings.isWithDataPermission) && J.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: R(Y), tableClass: Z, tableStyle: X, pageContext: Y, configureObj: J, backendUrl: oe, cellStyleRender: qe, rowStyleRender: We, titleStyleRender: Qe, validateEitConditions: Xe };
25
+ const o2 = { isSql: true, optionTableHeight: 0, rowKeyProp: J.props.dataOrigin.principalLinkage, extraParam: { beanName: Y.beanName, functionCode: t2 + ".listData", tableName: ne, systemCode: e3, pageCode: Y.code, pageVersion: Y.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: Se, esc: De }, indexContinuous: !(!J.props || !J.props.otherSettings) && J.props.otherSettings.serialNumberContinuous, initSearch: !J.props || false !== J.props.dataOrigin.initializationQuery, resizeHeight: je, pageCode: Y.code, pageVersion: Y.version, additionalParamMap: I(Y), showOverflowTooltip: !(!J.props || !J.props.otherSettings || void 0 !== J.props.otherSettings.isBreakLine && false !== J.props.otherSettings.isBreakLine), isEnableEnterEvent: J.props && J.props.otherSettings && J.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(J.props && J.props.otherSettings && J.props.otherSettings.isWithDataPermission) && J.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: O(Y), tableClass: Z, tableStyle: X, pageContext: Y, configureObj: J, backendUrl: oe, cellStyleRender: qe, rowStyleRender: We, titleStyleRender: Qe, validateEitConditions: Xe };
26
26
  return function(e4) {
27
27
  var _a;
28
28
  ((_a = J.props.highOrder) == null ? void 0 : _a.mergeFields) && J.props.highOrder.mergeFields.length > 0 && (e4.mergeFields = J.props.highOrder.mergeFields.join(","));
@@ -56,7 +56,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
56
56
  }();
57
57
  const re = t(), ue = t(), se = function() {
58
58
  let e3 = oe + "/dsc/commons/list";
59
- e3 && (e3 = O(e3, ee, te, Y.isTest));
59
+ e3 && (e3 = R(e3, ee, te, Y.isTest));
60
60
  return e3;
61
61
  }(), ce = T(Y.code, Y.version, J.uuid), pe = Y.code + "_" + ce, de = t([]), fe = Y.entity.page, ge = t({ data: [] }), me = Y.superGridItems, ve = me ? me[J.uuid] : null, he = t(false), be = q;
62
62
  function we() {
@@ -101,7 +101,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
101
101
  let t2;
102
102
  const n2 = y(e3.events, "click");
103
103
  if (n2) {
104
- if (ie.value[n2] = e3, "lineEditSave" === n2 ? t2 = Ce : "restoreEdit" === n2 ? t2 = Te : "lineEditUpdate" === n2 ? t2 = Oe : "lineEditDelete" === n2 && (t2 = ke), !t2) {
104
+ if (ie.value[n2] = e3, "lineEditSave" === n2 ? t2 = Ce : "restoreEdit" === n2 ? t2 = Te : "lineEditUpdate" === n2 ? t2 = Re : "lineEditDelete" === n2 && (t2 = ke), !t2) {
105
105
  t2 = x(Y, e3.events, "click");
106
106
  }
107
107
  } else ie.value[e3.uuid] = e3, t2 = Be;
@@ -136,15 +136,15 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
136
136
  }) : ue.value.restoreRow(i2, ce);
137
137
  d(Y, J, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
138
138
  }
139
- function Oe(e3, t2, n2, o2, i2) {
139
+ function Re(e3, t2, n2, o2, i2) {
140
140
  const a2 = ie.value.lineEditUpdate, l2 = J;
141
141
  a2.props.base.tableUuid = l2.uuid;
142
142
  const r2 = f(Y, a2, { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2 });
143
143
  r2 && (N(r2) ? r2.then((l3) => {
144
- l3 && Re(e3, t2, n2, o2, i2, a2);
145
- }) : Re(e3, t2, n2, o2, i2, a2));
144
+ l3 && Oe(e3, t2, n2, o2, i2, a2);
145
+ }) : Oe(e3, t2, n2, o2, i2, a2));
146
146
  }
147
- function Re(e3, t2, n2, o2, i2, a2) {
147
+ function Oe(e3, t2, n2, o2, i2, a2) {
148
148
  Y.editData = n2, p({ pageContext: Y, configureObj: a2 }).then((a3) => {
149
149
  if (true === a3.canExecute) {
150
150
  ue.value.editRow(i2, ce);
@@ -207,6 +207,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
207
207
  }
208
208
  function Ne() {
209
209
  if (!ue.value) return;
210
+ Q.configure.name, Q.configure;
210
211
  const e3 = U(Q.pageContext, Q.configure);
211
212
  if (e3) {
212
213
  if (e3.isCalcHeight) {
@@ -282,7 +283,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
282
283
  }
283
284
  n(() => {
284
285
  const e3 = Ke();
285
- ue.value && e3 && e3.distanceToBottom && (ue.value.tableHeight = e3.distanceToBottom - 110), Q.pageContext.pageRuntimeStyle, window.addEventListener("message", Pe), F.$on(pe + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
286
+ ue.value && e3 && e3.distanceToBottom && (ue.value.tableHeight = e3.distanceToBottom - 110), Q.pageContext.pageRuntimeStyle && Q.pageContext.pageRuntimeStyle.height, window.addEventListener("message", Pe), F.$on(pe + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
286
287
  ue.value.closePageDialog({ entity: t2, pageCode: n2, jumpInfo: e4 });
287
288
  }), F.$on(pe + "_close-dialog-get-entity", () => {
288
289
  F.$emit(pe + "_close-super-dialog");