super-page-runtime 2.3.4-sit1 → 2.3.5

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 (27) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +53 -53
  2. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  3. package/dist/es/components/runtime/utils/events/print-label.js +26 -25
  4. package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
  5. package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
  6. package/dist/es/components/runtime/utils/page-init-util.js +2 -1
  7. package/dist/es/components/runtime/utils/page-store.js +10 -10
  8. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  9. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  10. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
  11. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +12 -7
  12. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +19 -17
  13. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
  14. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
  15. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +10 -9
  16. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +1 -1
  17. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
  18. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +50 -49
  20. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
  21. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -0
  22. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -0
  23. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  24. package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
  25. package/dist/es/components/runtime/views/super-page.vue2.js +12 -11
  26. package/dist/es.zip +0 -0
  27. package/package.json +2 -2
@@ -74,7 +74,7 @@ class ExpressionEvaluator {
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,32 +1,34 @@
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 a, resolveComponent as l, createBlock as o, openBlock as r, withCtx as s, createVNode as u, createTextVNode as p, toDisplayString as n } from "vue";
2
+ import { packageTemplateFiles as i } from "../../../utils/common-util.js";
3
+ const m = "${", c = "}", d = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object } }, emits: ["export", "close"], setup(e2, { emit: d2 }) {
4
+ const g = e2, f = d2, b = t([]), h = t([]), x = g.configure.props.base, v = g.pageContext.entity.data;
5
5
  function w(e3) {
6
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;
7
+ const o2 = l2.indexOf(m), r2 = l2.indexOf(c);
8
+ return -1 !== o2 && -1 !== r2 ? (o2 > r2 ? l2 = l2.substring(0, r2) + l2.substring(r2 + 1) : (t2 = l2.substring(o2 + 2, r2), a2 = l2.substring(o2, r2 + 1), h.value.push(t2), h.value, l2 = l2.replace(a2, "")), w(l2)) : h.value;
9
9
  }
10
10
  function y() {
11
11
  f("close");
12
12
  }
13
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));
14
+ x.templateFiles && x.templateFiles.length > 0 ? b.value = i(x.templateFiles) : x.templateUuid && x.templateName && b.value.push({ templateUuid: x.templateUuid, templateName: x.templateName }), b.value.forEach((e3) => {
15
+ e3 && e3.templateName && (e3.templateName = function(e4) {
16
+ const t2 = w(e4);
17
+ return t2.forEach((t3) => {
18
+ const a2 = m + t3 + c;
19
+ let l2;
20
+ -1 !== e4.indexOf(a2) && v.hasOwnProperty(t3) && (l2 = v[t3] ? v[t3] : "", e4 = e4.replace(a2, l2));
21
+ }), e4;
22
+ }(e3.templateName));
21
23
  });
22
24
  }), (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
+ const a2 = l("el-table-column"), i2 = l("el-button"), m2 = l("el-table"), c2 = l("el-dialog");
26
+ return r(), o(c2, { "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), "model-value": "", onClose: y }, { default: s(() => [u(m2, { data: b.value, style: { width: "100%" } }, { default: s(() => [u(a2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: s((e4) => [p(n(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), u(a2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: s((t3) => [u(i2, { type: "text", size: "small", onClick: (e4) => {
25
27
  return a3 = t3.row, void f("export", g.configure, a3);
26
28
  var a3;
27
- } }, { default: r(() => [u(i(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["title"]);
29
+ } }, { default: s(() => [p(n(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["title"]);
28
30
  };
29
31
  } });
30
32
  export {
31
- c as default
33
+ d as default
32
34
  };
@@ -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");
@@ -42,7 +42,7 @@ const U = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, st
42
42
  const t2 = e3.result;
43
43
  x(z, F, t2);
44
44
  }), S.$on(T.value + "-pickFileDone", (e3) => {
45
- X.value.pickFileDone(e3);
45
+ T.value, X.value.pickFileDone(e3);
46
46
  }), n(() => {
47
47
  const e3 = G.value;
48
48
  R(e3, q.pageContext, q.configure, { formItemRef: Y.value, componentRef: X.value, titleRef: Z.value, value: e3, entity: q.pageContext.entity.data, pageData: q.pageContext.entity.page });
@@ -7,27 +7,27 @@ import Y from "../common/title-suffix-element.vue.js";
7
7
  import R from "dayjs";
8
8
  import { $t as _ } from "../../../../utils/i18n-util.js";
9
9
  const z = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
10
- const z2 = e2, P = z2.pageContext.entity ? z2.pageContext.entity : {}, S = z2.configure.runtime ? z2.configure.runtime : {}, w = S.style, A = S.class, D = S.headerStyle, q = S.titleExceedStyle, I = a(S.props ? S.props : {});
11
- let M = h(z2.pageContext, z2.configure, I.value.prop);
12
- if (z2.pageContext.modelFieldsMap && M && M.length > 0 && "data" === M[0]) {
13
- const e3 = C(M, z2.pageContext);
10
+ const z2 = e2, P = z2.pageContext.entity ? z2.pageContext.entity : {}, S = z2.configure.runtime ? z2.configure.runtime : {}, w = S.style, A = S.class, D = S.headerStyle, $ = S.titleExceedStyle, q = a(S.props ? S.props : {});
11
+ let I = h(z2.pageContext, z2.configure, q.value.prop);
12
+ if (z2.pageContext.modelFieldsMap && I && I.length > 0 && "data" === I[0]) {
13
+ const e3 = C(I, z2.pageContext);
14
14
  e3 && function(e4) {
15
15
  const a2 = e4.dataType;
16
- k(a2) && ("year" === I.value.dateType && "YYYY" === I.value.valueFormat || "month" === I.value.dateType && "YYYY-MM" === I.value.valueFormat) && (I.value.valueFormat = "x");
16
+ k(a2) && ("year" === q.value.dateType && "YYYY" === q.value.valueFormat || "month" === q.value.dateType && "YYYY-MM" === q.value.valueFormat) && (q.value.valueFormat = "x");
17
17
  }(e3);
18
18
  }
19
- let B = null, N = false;
20
- if (I.value.dateType && I.value.dateType.includes("range")) {
21
- N = true;
22
- let e3 = I.value.prop2;
19
+ let M = null, B = false;
20
+ if (q.value.dateType && q.value.dateType.includes("range")) {
21
+ B = true;
22
+ let e3 = q.value.prop2;
23
23
  e3 && e3.startsWith("${") || (e3 = "${page." + z2.configure.uuid + "-2}");
24
24
  const a2 = x(P, e3, null);
25
- if (e3 = e3.substring(2, e3.length - 1), B = e3.split("."), !(a2 || P.data && (P.data.id || P.data.ID)) && I.value.defaultValue2) {
26
- const e4 = x(P, I.value.defaultValue2);
27
- b(P, B, e4);
25
+ if (e3 = e3.substring(2, e3.length - 1), M = e3.split("."), !(a2 || P.data && (P.data.id || P.data.ID)) && q.value.defaultValue2) {
26
+ const e4 = x(P, q.value.defaultValue2);
27
+ b(P, M, e4);
28
28
  }
29
29
  }
30
- const U = a(null), W = a(null), $ = a(null);
30
+ const N = a(null), U = a(null), W = a(null);
31
31
  function E(e3, a2) {
32
32
  if (!e3) return e3;
33
33
  if (a2) {
@@ -37,7 +37,7 @@ const z = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
37
37
  let t2 = null;
38
38
  return t2 = "x" === a2 ? l2.toDate().getTime() : R(e3).format(a2), t2;
39
39
  } catch (a3) {
40
- return e3;
40
+ return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${q.value.valueFormat}`), e3;
41
41
  }
42
42
  }
43
43
  return e3;
@@ -45,30 +45,30 @@ const z = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
45
45
  if (l(() => {
46
46
  t(() => {
47
47
  const e3 = O.value;
48
- T(e3, z2.pageContext, z2.configure, { formItemRef: U.value, componentRef: W.value, titleRef: $.value, value: e3, entity: z2.pageContext.entity.data, pageData: z2.pageContext.entity.page });
48
+ T(e3, z2.pageContext, z2.configure, { formItemRef: N.value, componentRef: U.value, titleRef: W.value, value: e3, entity: z2.pageContext.entity.data, pageData: z2.pageContext.entity.page });
49
49
  });
50
- }), M) {
51
- const e3 = F(P, M), a2 = E(e3, I.value.valueFormat);
52
- e3 !== a2 && b(P, M, a2);
50
+ }), I) {
51
+ const e3 = F(P, I), a2 = E(e3, q.value.valueFormat);
52
+ e3 !== a2 && b(P, I, a2);
53
53
  }
54
- if (B) {
55
- const e3 = F(P, B), a2 = E(e3, I.value.valueFormat);
56
- e3 !== a2 && b(P, B, a2);
54
+ if (M) {
55
+ const e3 = F(P, M), a2 = E(e3, q.value.valueFormat);
56
+ e3 !== a2 && b(P, M, a2);
57
57
  }
58
58
  const O = o({ get() {
59
- if (N) {
59
+ if (B) {
60
60
  const e3 = [];
61
- let a2 = F(P, M);
62
- e3.push(E(a2, I.value.valueFormat));
63
- let l2 = F(P, B);
64
- return e3.push(E(l2, I.value.valueFormat)), e3;
61
+ let a2 = F(P, I);
62
+ e3.push(E(a2, q.value.valueFormat));
63
+ let l2 = F(P, M);
64
+ return e3.push(E(l2, q.value.valueFormat)), e3;
65
65
  }
66
- return E(F(P, M), I.value.valueFormat);
66
+ return E(F(P, I), q.value.valueFormat);
67
67
  }, set(e3) {
68
- N ? Array.isArray(e3) ? (b(P, M, e3[0]), b(P, B, e3[1])) : null === e3 && (b(P, M, null), b(P, B, null)) : b(P, M, e3);
69
- } }), G = a(y(I.value.dateScopeDetails, I.value.sourceType, I.value.dateType));
70
- if (I.value.shortcutsFunc) {
71
- const e3 = V(z2.pageContext, I.value.shortcutsFunc);
68
+ B ? Array.isArray(e3) ? (b(P, I, e3[0]), b(P, M, e3[1])) : null === e3 && (b(P, I, null), b(P, M, null)) : b(P, I, e3);
69
+ } }), G = a(y(q.value.dateScopeDetails, q.value.sourceType, q.value.dateType));
70
+ if (q.value.shortcutsFunc) {
71
+ const e3 = V(z2.pageContext, q.value.shortcutsFunc);
72
72
  if (e3) {
73
73
  let a2 = e3.apply(e3, [{ pageContext: z2.pageContext, configureObj: z2.configure }]);
74
74
  if (a2) {
@@ -79,7 +79,7 @@ const z = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
79
79
  }
80
80
  return (e3, a2) => {
81
81
  const l2 = r("el-time-picker"), t2 = r("el-date-picker"), o2 = r("el-form-item");
82
- return n(), u(o2, { ref_key: "formItemRef", ref: U, required: I.value.required, class: p(s(A)), "label-width": I.value.labelWidth, style: i(s(w)) }, { label: c(() => [I.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: $, style: i({ ...s(D), ...s(q) }) }, [I.value.prefixType ? (n(), u(Y, { key: 0, pageContext: e3.pageContext, property: I.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(_)(I.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == I.value.dateType || "timerange" == I.value.dateType ? (n(), u(l2, { key: 0, ref_key: "componentRef", ref: W, "is-range": "timerange" == I.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: I.value.clearable, disabled: "disabled" === I.value.state, readonly: "readonly" === I.value.state, size: I.value.size, placeholder: I.value.placeholder, "start-placeholder": I.value.placeholder, "end-placeholder": I.value.endPlaceholder ? I.value.endPlaceholder : I.value.placeholder, "unlink-panels": true, format: I.value.format, "value-format": I.value.valueFormat, modelValue: O.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => O.value = e4), shortcuts: G.value, type: I.value.dateType, onChange: a2[1] || (a2[1] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (n(), u(t2, { key: 1, ref_key: "componentRef", ref: W, clearable: I.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === I.value.state, readonly: "readonly" === I.value.state, size: I.value.size, placeholder: I.value.placeholder, "start-placeholder": I.value.placeholder, "end-placeholder": I.value.endPlaceholder ? I.value.endPlaceholder : I.value.placeholder, format: I.value.format, "value-format": I.value.valueFormat, modelValue: O.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => O.value = e4), shortcuts: G.value, type: I.value.dateType, onChange: a2[8] || (a2[8] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
82
+ return n(), u(o2, { ref_key: "formItemRef", ref: N, required: q.value.required, class: p(s(A)), "label-width": q.value.labelWidth, style: i(s(w)) }, { label: c(() => [q.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: W, style: i({ ...s(D), ...s($) }) }, [q.value.prefixType ? (n(), u(Y, { key: 0, pageContext: e3.pageContext, property: q.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(_)(q.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == q.value.dateType || "timerange" == q.value.dateType ? (n(), u(l2, { key: 0, ref_key: "componentRef", ref: U, "is-range": "timerange" == q.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: q.value.clearable, disabled: "disabled" === q.value.state, readonly: "readonly" === q.value.state, size: q.value.size, placeholder: q.value.placeholder, "start-placeholder": q.value.placeholder, "end-placeholder": q.value.endPlaceholder ? q.value.endPlaceholder : q.value.placeholder, "unlink-panels": true, format: q.value.format, "value-format": q.value.valueFormat, modelValue: O.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => O.value = e4), shortcuts: G.value, type: q.value.dateType, onChange: a2[1] || (a2[1] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (n(), u(t2, { key: 1, ref_key: "componentRef", ref: U, clearable: q.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === q.value.state, readonly: "readonly" === q.value.state, size: q.value.size, placeholder: q.value.placeholder, "start-placeholder": q.value.placeholder, "end-placeholder": q.value.endPlaceholder ? q.value.endPlaceholder : q.value.placeholder, format: q.value.format, "value-format": q.value.valueFormat, modelValue: O.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => O.value = e4), shortcuts: G.value, type: q.value.dateType, onChange: a2[8] || (a2[8] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
83
83
  };
84
84
  } });
85
85
  export {
@@ -52,7 +52,7 @@ const P = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
52
52
  }, M = l(null), Q = l(null);
53
53
  return o(() => {
54
54
  x.$on(q.value + "-pickFileDone", (e3) => {
55
- $.value.pickFileDone(e3);
55
+ q.value, $.value.pickFileDone(e3);
56
56
  }), a(() => {
57
57
  const e3 = h(D, O), l2 = { showName: h(D, S), serverPath: e3 };
58
58
  g(l2, P2.pageContext, P2.configure, { formItemRef: M.value, componentRef: $.value, titleRef: Q.value, value: l2, entity: P2.pageContext.entity.data, pageData: P2.pageContext.entity.page });
@@ -1,78 +1,79 @@
1
- import { defineComponent as e, ref as t, computed as o, onMounted as n, nextTick as l, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as s, normalizeClass as c, unref as f, withCtx as v, createVNode as g, createCommentVNode as y, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
1
+ import { defineComponent as e, ref as t, computed as n, onMounted as o, nextTick as l, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as s, normalizeClass as c, unref as v, withCtx as f, createVNode as y, createCommentVNode as g, createSlots as d, createTextVNode as m, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
2
2
  import { SuperIcon as T } from "agilebuilder-ui";
3
3
  import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
4
- import { getModelFieldFromPageContext as w, isNumberDataType as V, setVariableValue as b, getVariableValue as h } from "../../../../utils/page-helper-util.js";
4
+ import { getModelFieldFromPageContext as w, isNumberDataType as V, setVariableValue as h, getVariableValue as b } from "../../../../utils/page-helper-util.js";
5
5
  import { handleFormEvent as _, handleAfterInitEvent as S, doSuffixOrPrefixClickEvent as j } from "../../../../utils/events/event-util.js";
6
- import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as D } from "../../../../utils/form/scan-util.js";
7
- import M from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as N } from "agilebuilder-ui/src/utils/common-util";
9
- import P from "../../../../utils/eventBus.js";
10
- import { $t as q } from "../../../../utils/i18n-util.js";
11
- const z = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
6
+ import { formatScanRuleSets as O, analysisScanValue as R, setScanAnalysisValue as N } from "../../../../utils/form/scan-util.js";
7
+ import D from "../common/title-suffix-element.vue.js";
8
+ import { isMobileBrowser as J } from "agilebuilder-ui/src/utils/common-util";
9
+ import M from "../../../../utils/eventBus.js";
10
+ import { $t as P } from "../../../../utils/i18n-util.js";
11
+ const q = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
12
12
  var _a, _b, _c;
13
- const J = e2, L = J.pageContext.entity ? J.pageContext.entity : {}, B = t("text");
14
- let F = k(J.pageContext, J.configure);
15
- if (J.pageContext.modelFieldsMap) {
16
- const e3 = w(F, J.pageContext);
13
+ const z = e2, L = z.pageContext.entity ? z.pageContext.entity : {}, B = t("text");
14
+ let F = k(z.pageContext, z.configure);
15
+ if (z.pageContext.modelFieldsMap) {
16
+ const e3 = w(F, z.pageContext);
17
17
  e3 && (B.value = V(e3.dataType) ? "number" : "text");
18
18
  }
19
- const $ = t(N()), A = J.pageContext.code, E = t(F && F.length > 0 ? A + "__" + F.join("__") : null), U = o({ get: () => h(L, F), set(e3) {
20
- b(L, F, e3);
21
- } }), W = t(null), G = t(null), H = t(null), K = J.configure.runtime ? J.configure.runtime : {}, Q = t(K.props ? K.props : {}), X = t(!!((_a = Q.value.scan) == null ? void 0 : _a.enable));
19
+ const $ = t(J()), A = z.pageContext.code, E = t(F && F.length > 0 ? A + "__" + F.join("__") : null), U = n({ get: () => b(L, F), set(e3) {
20
+ h(L, F, e3);
21
+ } }), W = t(null), G = t(null), H = t(null), K = z.configure.runtime ? z.configure.runtime : {}, Q = t(K.props ? K.props : {}), X = t(!!((_a = Q.value.scan) == null ? void 0 : _a.enable));
22
22
  let Y = false;
23
23
  const Z = window.localStorage.getItem("auth_source");
24
24
  Z && "dingtalk" === Z && (Y = true);
25
25
  let ee = "";
26
- ee = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
27
- const te = !(!$.value || !ee || "app" !== ee), oe = t(!!((te || Y) && X.value || $.value && X.value && "https:" === window.location.protocol));
28
- let ne = {};
29
- ((_b = Q.value.scan) == null ? void 0 : _b.enable) && ((_c = Q.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(Q.value.scan.ruleList).then((e3) => {
30
- ne = e3;
26
+ const te = navigator.userAgent;
27
+ ee = te.indexOf(" uni-app ") > 0 ? "app" : "browser";
28
+ const ne = !(!$.value || !ee || "app" !== ee), oe = t(!!((ne || Y) && X.value || $.value && X.value && "https:" === window.location.protocol));
29
+ let le = {};
30
+ ((_b = Q.value.scan) == null ? void 0 : _b.enable) && ((_c = Q.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (O(Q.value.scan.ruleList).then((e3) => {
31
+ le = e3;
31
32
  }), u(() => U.value, (e3) => {
32
33
  e3 = e3.trim();
33
- const t2 = O(e3, ne);
34
- t2 && D(J.pageContext, t2.scanSet, t2.params);
34
+ const t2 = R(e3, le);
35
+ t2 && N(z.pageContext, t2.scanSet, t2.params);
35
36
  }));
36
- const le = K.style, ae = K.class, ue = K.headerStyle, ie = K.titleExceedStyle;
37
- function re(e3) {
38
- return b(L, F, e3);
37
+ const ae = K.style, ue = K.class, ie = K.headerStyle, re = K.titleExceedStyle;
38
+ function pe(e3) {
39
+ return h(L, F, e3);
39
40
  }
40
- n(() => {
41
- P.$on(E.value + "-scanDone", (e3) => {
42
- re(e3.result), _(e3.result, J.pageContext, J.configure, "afterScanDone");
41
+ o(() => {
42
+ M.$on(E.value + "-scanDone", (e3) => {
43
+ E.value, JSON.stringify(e3), pe(e3.result), _(e3.result, z.pageContext, z.configure, "afterScanDone");
43
44
  }), l(() => {
44
45
  var _a2;
45
46
  const e3 = U.value;
46
- S(e3, J.pageContext, J.configure, { formItemRef: W.value, componentRef: G.value, titleRef: H.value, value: e3, entity: J.pageContext.entity.data, pageData: J.pageContext.entity.page }), oe.value && ((_a2 = Q.value.scan) == null ? void 0 : _a2.autoOpen) && se();
47
+ S(e3, z.pageContext, z.configure, { formItemRef: W.value, componentRef: G.value, titleRef: H.value, value: e3, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page }), oe.value && ((_a2 = Q.value.scan) == null ? void 0 : _a2.autoOpen) && ce();
47
48
  });
48
49
  }), a(() => {
49
- P.$off(E.value + "-scanDone");
50
+ M.$off(E.value + "-scanDone");
50
51
  });
51
- const pe = t(false);
52
- function se() {
53
- if (te || Y) {
54
- const e3 = { type: "scan", componentId: E.value, systemCode: J.pageContext.systemCode };
55
- Y && (e3.type = "dingTalkScan"), window.parent.parent ? window.parent.parent.postMessage(JSON.stringify(e3), "*") : window.parent && window.parent.postMessage(JSON.stringify(e3), "*");
56
- } else if ($.value) if ("https:" === window.location.protocol) pe.value = true;
52
+ const se = t(false);
53
+ function ce() {
54
+ if (ne || Y) {
55
+ const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
56
+ Y && (e3.type = "dingTalkScan"), window.parent.parent ? (window.parent.parent, window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (window.parent, window.parent.postMessage(JSON.stringify(e3), "*"));
57
+ } else if ($.value) if ("https:" === window.location.protocol) se.value = true;
57
58
  else {
58
- const e3 = { type: "scan", componentId: E.value, systemCode: J.pageContext.systemCode };
59
+ const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
59
60
  window.parent.postMessage(JSON.stringify(e3), "*");
60
61
  }
61
- else pe.value = true;
62
+ else se.value = true;
62
63
  }
63
- function ce(e3) {
64
- pe.value = false, re(e3);
64
+ function ve(e3) {
65
+ se.value = false, pe(e3);
65
66
  }
66
- return z2({ getValue: function() {
67
- return h(L, F);
68
- }, setValue: re, scanClick: se }), (e3, t2) => {
69
- const o2 = i("el-input"), n2 = i("scan-code-input-browser"), l2 = i("el-form-item");
70
- return p(), r(l2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: c(f(ae)), "label-width": Q.value.labelWidth, style: s(f(le)) }, { label: v(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: s({ ...f(ue), ...f(ie) }) }, [Q.value.prefixType ? (p(), r(M, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(f(q)(Q.value.title)), 1)], 64))], 4)) : y("", true)]), default: v(() => [g(o2, { ref_key: "componentRef", ref: G, disabled: "disabled" === Q.value.state, readonly: "readonly" === Q.value.state, size: Q.value.size, clearable: Q.value.clearable, placeholder: Q.value.placeholder, maxlength: Q.value.maxLength, "show-word-limit": Q.value.showInputNum, type: B.value, modelValue: U.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => U.value = e4), onInput: t2[6] || (t2[6] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
71
- let t3 = h(L, F);
72
- (void 0 === J.configure.props.base.trimable || J.configure.props.base.trimable) && (t3 = t3.trim()), b(L, F, t3), _(e5, J.pageContext, J.configure, "blur");
73
- }(e4)), onFocus: t2[9] || (t2[9] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "clear")) }, m({ _: 2 }, ["outer" != Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prefix", fn: v(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(f(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => f(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(q)(Q.value.preText)), 1)]), key: "0" } : void 0, "outer" == Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prepend", fn: v(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(f(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => f(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(q)(Q.value.preText)), 1)]), key: "1" } : void 0, "outer" != Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "suffix", fn: v(() => [Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(f(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => f(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(q)(Q.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "append", fn: v(() => [oe.value ? (p(), r(f(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => se()) })) : y("", true), Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(f(T), { key: 1, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => f(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(q)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), pe.value ? (p(), r(n2, { key: 0, onClose: ce })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
67
+ return q2({ getValue: function() {
68
+ return b(L, F);
69
+ }, setValue: pe, scanClick: ce }), (e3, t2) => {
70
+ const n2 = i("el-input"), o2 = i("scan-code-input-browser"), l2 = i("el-form-item");
71
+ return p(), r(l2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: c(v(ue)), "label-width": Q.value.labelWidth, style: s(v(ae)) }, { label: f(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: s({ ...v(ie), ...v(re) }) }, [Q.value.prefixType ? (p(), r(D, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [m(x(v(P)(Q.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(n2, { ref_key: "componentRef", ref: G, disabled: "disabled" === Q.value.state, readonly: "readonly" === Q.value.state, size: Q.value.size, clearable: Q.value.clearable, placeholder: Q.value.placeholder, maxlength: Q.value.maxLength, "show-word-limit": Q.value.showInputNum, type: B.value, modelValue: U.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => U.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
72
+ let t3 = b(L, F);
73
+ t3 = t3.trim(), h(L, F, t3), _(e5, z.pageContext, z.configure, "blur");
74
+ }(e4)), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, d({ _: 2 }, ["outer" != Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prefix", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.preText)), 1)]), key: "0" } : void 0, "outer" == Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prepend", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.preText)), 1)]), key: "1" } : void 0, "outer" != Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "suffix", fn: f(() => [Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "append", fn: f(() => [oe.value ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => ce()) })) : g("", true), Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), se.value ? (p(), r(o2, { key: 0, onClose: ve })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
74
75
  };
75
76
  } });
76
77
  export {
77
- z as default
78
+ q as default
78
79
  };