super-page-runtime 2.3.2 → 2.3.3

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 (29) 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 +95 -88
  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/container/tabs/tabs-runtime.vue.js +1 -1
  15. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +81 -29
  16. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
  17. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +10 -9
  18. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
  20. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +3 -3
  21. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +47 -46
  22. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
  23. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -0
  24. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -0
  25. package/dist/es/components/runtime/views/home-chart.vue.js +5 -5
  26. package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
  27. package/dist/es/components/runtime/views/super-page.vue2.js +11 -10
  28. package/dist/es/style.css +17 -8
  29. package/package.json +2 -2
@@ -1,44 +1,96 @@
1
- import { defineComponent as e, ref as t, onMounted as n, nextTick as o, createBlock as a, openBlock as i, unref as l, normalizeClass as u, normalizeStyle as r, withCtx as c, createElementBlock as p, Fragment as s, renderList as f, createCommentVNode as g, createElementVNode as m, toDisplayString as d } from "vue";
2
- import { ElTabs as b, ElTabPane as y } from "element-plus";
3
- import v from "../../object-render.vue.js";
4
- import { SuperIcon as x } from "agilebuilder-ui";
5
- import { handleAfterInitEvent as C, handleEvent as T } from "../../../../utils/events/event-util.js";
6
- import { $t as h } from "../../../../utils/i18n-util.js";
7
- const k = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
8
- const k2 = e2, V = t(null);
9
- V.value = k2.configure.props.defaultOpen ? k2.configure.props.defaultOpen : 1;
10
- const N = t(null), _ = k2.configure.runtime ? k2.configure.runtime : {}, j = _.style, R = _.class, z = _.headerStyle;
11
- function A(e3, t2) {
12
- return T(e3, k2.pageContext, k2.configure, "before-leave", { activeName: e3, oldActiveName: t2 }) ?? true;
1
+ import { defineComponent as e, ref as t, watch as n, onMounted as o, nextTick as a, resolveComponent as i, createBlock as c, openBlock as l, unref as u, normalizeClass as r, normalizeStyle as s, withCtx as p, createElementBlock as f, createCommentVNode as d, Fragment as g, renderList as m, createElementVNode as b, toDisplayString as y, withModifiers as v, createTextVNode as h } from "vue";
2
+ import { ElTabs as x, ElTabPane as C } from "element-plus";
3
+ import T from "../../object-render.vue.js";
4
+ import { SuperIcon as E } from "agilebuilder-ui";
5
+ import { handleAfterInitEvent as k, handleEvent as N } from "../../../../utils/events/event-util.js";
6
+ import { $t as V } from "../../../../utils/i18n-util.js";
7
+ import { isPromise as _ } from "../../../../utils/page-helper-util.js";
8
+ const w = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: w2 }) {
9
+ const A = e2, P = t(""), j = t([]);
10
+ A.configure.items.forEach((e3) => {
11
+ e3.code || (e3.code = e3.index);
12
+ }), P.value = A.configure.props.defaultOpen ? A.configure.props.defaultOpen : 1;
13
+ const O = t(null), R = A.configure.runtime ? A.configure.runtime : {}, B = R.style, z = R.class, I = R.headerStyle;
14
+ function S(e3, t2) {
15
+ return N(e3, A.pageContext, A.configure, "before-leave", { activeName: e3, oldActiveName: t2 }) ?? true;
13
16
  }
14
17
  function D(e3, t2) {
15
18
  const n2 = { pane: e3, ev: t2 }, o2 = e3.paneName;
16
- return k2.pageContext.activeTab = o2, k2.pageContext.activeLabel = n2.label, T(o2, k2.pageContext, k2.configure, "tab-click", n2);
19
+ return A.pageContext.activeTab = o2, A.pageContext.activeLabel = n2.label, N(o2, A.pageContext, A.configure, "tab-click", n2);
17
20
  }
18
- function E(e3) {
21
+ function F(e3) {
19
22
  const t2 = { paneName: e3 };
20
- return k2.pageContext.activeTab = e3, T(e3, k2.pageContext, k2.configure, "tab-change", t2);
23
+ return A.pageContext.activeTab = e3, N(e3, A.pageContext, A.configure, "tab-change", t2);
21
24
  }
22
- function O(e3) {
23
- const t2 = { paneName: e3 };
24
- return T(e3, k2.pageContext, k2.configure, "tab-remove", t2);
25
+ function L(e3) {
26
+ const t2 = { paneName: e3 }, n2 = N(e3, A.pageContext, A.configure, "tab-remove", t2);
27
+ _(n2) ? n2.then((t3) => {
28
+ false !== t3 && U(e3);
29
+ }) : false !== n2 && U(e3);
30
+ }
31
+ function U(e3) {
32
+ P.value === e3 && A.configure.items.forEach((t2, n2) => {
33
+ if (t2.code === e3) {
34
+ const e4 = A.configure.items[n2 + 1] || A.configure.items[n2 - 1];
35
+ e4 && void 0 !== e4.code && (P.value = e4.code);
36
+ }
37
+ }), j.value.includes(e3) || j.value.push(e3);
25
38
  }
26
- function S() {
27
- return T(null, k2.pageContext, k2.configure, "tab-add");
39
+ function q() {
40
+ return N(null, A.pageContext, A.configure, "tab-add");
28
41
  }
29
- function q(e3, t2) {
42
+ function G(e3, t2) {
30
43
  const n2 = { paneName: e3, action: t2 };
31
- return T(e3, k2.pageContext, k2.configure, "edit", n2);
44
+ return N(e3, A.pageContext, A.configure, "edit", n2);
45
+ }
46
+ function H() {
47
+ const e3 = N(A.configure.items, A.pageContext, A.configure, "tab-reset");
48
+ _(e3) ? e3.then((e4) => {
49
+ j.value = [];
50
+ }) : false !== e3 && (j.value = []);
32
51
  }
33
- return n(() => {
34
- o(() => {
52
+ return n(j, (e3) => {
53
+ e3 && e3.length > 0 ? e3.forEach((e4) => {
54
+ const t2 = document.getElementById("tab-" + e4);
55
+ t2 && (t2.style.display = "none");
56
+ }) : A.configure.items.forEach((e4) => {
57
+ const t2 = document.getElementById("tab-" + e4.code);
58
+ t2 && (t2.style.display = "");
59
+ });
60
+ }, { deep: true }), o(() => {
61
+ a(() => {
35
62
  let e3 = [];
36
- k2.configure.items.forEach((t2) => {
37
- t2.code && e3.push(document.querySelector("." + t2.code));
38
- }), C(null, k2.pageContext, k2.configure, { componentRef: N.value, tabsDom: e3, entity: k2.pageContext.entity.data, pageData: k2.pageContext.entity.page });
63
+ A.configure.items.forEach((t2) => {
64
+ t2.code && e3.push(document.getElementById("tab-" + t2.code));
65
+ }), k(null, A.pageContext, A.configure, { componentRef: O.value, tabsDom: e3, entity: A.pageContext.entity.data, pageData: A.pageContext.entity.page });
66
+ });
67
+ }), w2({ thisRef: O, activeName: P, hiddenPanes: j, resetTab: H, hiddenTabPanes: function(e3) {
68
+ if (Array.isArray(e3)) {
69
+ const t2 = [];
70
+ e3.forEach((e4) => {
71
+ j.value.includes(e4) || t2.push(e4);
72
+ }), t2.length > 0 && j.value.push(...t2);
73
+ }
74
+ }, showTabPanes: function(e3) {
75
+ Array.isArray(e3) && e3.forEach((e4) => {
76
+ const t2 = j.value.indexOf(e4);
77
+ t2 > -1 && j.value.splice(t2, 1);
39
78
  });
40
- }), (e3, t2) => (i(), a(l(b), { ref_key: "thisRef", ref: N, modelValue: V.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => V.value = e4), type: e3.configure.props.cardType, "tab-position": e3.configure.props.tabPosition, style: r(l(j)), class: u([l(R), "runtime-page-container-tabs-view"]), "before-leave": A, onTabClick: D, onTabChange: E, onTabRemove: O, onTabAdd: S, onEdit: q }, { default: c(() => [(i(true), p(s, null, f(e3.configure.items, (t3, n2) => (i(), a(l(y), { key: n2, label: t3.label, name: t3.index, lazy: !!e3.configure.props.lazy }, { label: c(() => [m("span", { class: u(t3.code) }, [t3.iconType && t3.iconValue ? (i(), a(l(x), { key: 0, iconType: t3.iconType, iconValue: t3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : g("", true), m("span", { style: r(l(z)) }, d(l(h)(t3.label)), 5)], 2)]), default: c(() => [(e3.configure.props.isFullyRendered ?? 1) || t3.index === V.value ? (i(true), p(s, { key: 0 }, f(t3.items, (t4, n3) => (i(), a(v, { key: t4.uuid, pageContext: e3.pageContext, configure: t4 }, null, 8, ["pageContext", "configure"]))), 128)) : g("", true)]), _: 2 }, 1032, ["label", "name", "lazy"]))), 128))]), _: 1 }, 8, ["modelValue", "type", "tab-position", "style", "class"]));
79
+ }, showTabPanesOnly: function(e3) {
80
+ const t2 = [];
81
+ A.configure.items.forEach((n2) => {
82
+ e3.includes(n2.code) || t2.push(n2.code);
83
+ }), j.value = [...new Set(t2)];
84
+ }, hiddenTabPanesOnly: function(e3) {
85
+ const t2 = [];
86
+ A.configure.items.forEach((n2) => {
87
+ e3.includes(n2.code) && t2.push(n2.code);
88
+ }), j.value = [...new Set(t2)];
89
+ } }), (e3, t2) => {
90
+ const n2 = i("el-button");
91
+ return l(), c(u(x), { ref_key: "thisRef", ref: O, modelValue: P.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => P.value = e4), type: e3.configure.props.cardType, "tab-position": e3.configure.props.tabPosition, style: s(u(B)), class: r([u(z), "runtime-page-container-tabs-view"]), closable: e3.configure.props.closable, "before-leave": S, onTabClick: D, onTabChange: F, onTabRemove: L, onTabAdd: q, onEdit: G }, { default: p(() => [(l(true), f(g, null, m(A.configure.items, (t3, n3) => (l(), c(u(C), { key: n3, label: t3.label, name: t3.code, style: s({ display: false === t3.show ? "none" : "" }), lazy: !!e3.configure.props.lazy }, { label: p(() => [t3.iconType && t3.iconValue ? (l(), c(u(E), { key: 0, iconType: t3.iconType, iconValue: t3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : d("", true), b("span", { style: s(u(I)) }, y(u(V)(t3.label)), 5)]), default: p(() => [(e3.configure.props.isFullyRendered ?? 1) || t3.code === P.value ? (l(true), f(g, { key: 0 }, m(t3.items, (t4) => (l(), c(T, { key: t4.uuid, pageContext: e3.pageContext, configure: t4 }, null, 8, ["pageContext", "configure"]))), 128)) : d("", true)]), _: 2 }, 1032, ["label", "name", "style", "lazy"]))), 128)), e3.configure.props.resetable ? (l(), c(u(C), { key: 0, disabled: "", name: "-1" }, { label: p(() => [e3.configure.props.resetable ? (l(), c(n2, { key: 0, type: "text", circle: "", onClick: v(H, ["stop"]) }, { default: p(() => [h(y(e3.configure.props.resetButtonName || "重置"), 1)]), _: 1 })) : d("", true)]), _: 1 })) : d("", true)]), _: 1 }, 8, ["modelValue", "type", "tab-position", "style", "class", "closable"]);
92
+ };
41
93
  } });
42
94
  export {
43
- k as default
95
+ w as default
44
96
  };
@@ -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 {
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as l, watch as t, onMounted as i, nextTick as o, onUnmounted as a, resolveComponent as s, createBlock as n, createCommentVNode as u, openBlock as p, normalizeStyle as r, normalizeClass as m, unref as f, withCtx as v, createElementBlock as c, toDisplayString as d } from "vue";
1
+ import { defineComponent as e, ref as l, watch as t, onMounted as i, nextTick as o, onUnmounted as a, resolveComponent as s, createBlock as u, createCommentVNode as n, openBlock as p, normalizeStyle as r, normalizeClass as m, unref as f, withCtx as v, createElementBlock as c, toDisplayString as d } from "vue";
2
2
  import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
3
3
  import { handleAfterInitEvent as g, fileUploadBeforeUpload as C } from "../../../../utils/events/event-util.js";
4
4
  import x from "agilebuilder-ui/src/utils/request";
@@ -52,7 +52,7 @@ const w = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
52
52
  }, M = l(null), Q = l(null);
53
53
  return i(() => {
54
54
  k.$on(D.value + "-pickFileDone", (e3) => {
55
- $.value.pickFileDone(e3);
55
+ D.value, $.value.pickFileDone(e3);
56
56
  }), o(() => {
57
57
  const e3 = h(O, F), l2 = { showName: h(O, N), serverPath: e3 };
58
58
  g(l2, w2.pageContext, w2.configure, { formItemRef: M.value, componentRef: $.value, titleRef: Q.value, value: l2, entity: w2.pageContext.entity.data, pageData: w2.pageContext.entity.page });
@@ -61,7 +61,7 @@ const w = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
61
61
  k.$off(D.value + "-pickFileDone");
62
62
  }), (e3, l2) => {
63
63
  const t2 = s("el-form-item");
64
- return j.value.tittleShow ? (p(), n(t2, { key: 0, ref_key: "formItemRef", ref: M, required: j.value.required, class: m(f(T)), "label-width": j.value.labelWidth, style: r(f(R)) }, { label: v(() => [j.value.tittleShow ? (p(), c("div", { key: 0, ref_key: "titleRef", ref: Q, style: r({ ...f(z), ...f(I) }) }, d(f(_)(j.value.title)), 5)) : u("", true)]), default: v(() => [W.value ? (p(), n(f(b), { key: 0, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: D.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : W.value ? (p(), n(f(b), { key: 1, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: D.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true);
64
+ return j.value.tittleShow ? (p(), u(t2, { key: 0, ref_key: "formItemRef", ref: M, required: j.value.required, class: m(f(T)), "label-width": j.value.labelWidth, style: r(f(R)) }, { label: v(() => [j.value.tittleShow ? (p(), c("div", { key: 0, ref_key: "titleRef", ref: Q, style: r({ ...f(z), ...f(I) }) }, d(f(_)(j.value.title)), 5)) : n("", true)]), default: v(() => [W.value ? (p(), u(f(b), { key: 0, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: D.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : n("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : W.value ? (p(), u(f(b), { key: 1, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: D.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : n("", true);
65
65
  };
66
66
  } });
67
67
  export {
@@ -1,75 +1,76 @@
1
- import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as n, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as c, normalizeClass as s, unref as v, withCtx as f, createVNode as y, createCommentVNode as g, 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 V, isNumberDataType as h, setVariableValue as w, getVariableValue as b } 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 D, setScanAnalysisValue as O } from "../../../../utils/form/scan-util.js";
7
- import P from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as q } from "agilebuilder-ui/src/utils/common-util";
9
- import z from "../../../../utils/eventBus.js";
10
- import { $t as L } from "../../../../utils/i18n-util.js";
11
- const M = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: M2 }) {
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 N = e2, B = N.pageContext.entity ? N.pageContext.entity : {}, F = t("text");
14
- let J = k(N.pageContext, N.configure);
15
- if (N.pageContext.modelFieldsMap) {
16
- const e3 = V(J, N.pageContext);
17
- e3 && (F.value = h(e3.dataType) ? "number" : "text");
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
+ e3 && (B.value = V(e3.dataType) ? "number" : "text");
18
18
  }
19
- const $ = t(q()), A = N.pageContext.code, E = t(J && J.length > 0 ? A + "__" + J.join("__") : null), U = l({ get: () => b(B, J), set(e3) {
20
- e3 = e3.trim(), w(B, J, e3);
21
- } }), W = t(null), G = t(null), H = t(null), K = N.configure.runtime ? N.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
+ e3 = e3.trim(), 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), le = t(!!((te || Y) && X.value || $.value && X.value && "https:" === window.location.protocol));
28
- let oe = {};
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
- oe = 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 = D(e3, oe);
34
- t2 && O(N.pageContext, t2.scanSet, t2.params);
34
+ const t2 = R(e3, le);
35
+ t2 && N(z.pageContext, t2.scanSet, t2.params);
35
36
  }));
36
- const ne = K.style, ae = K.class, ue = K.headerStyle, ie = K.titleExceedStyle;
37
- function re(e3) {
38
- return w(B, J, 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
41
  o(() => {
41
- z.$on(E.value + "-scanDone", (e3) => {
42
- re(e3.result), _(e3.result, N.pageContext, N.configure, "afterScanDone");
43
- }), n(() => {
42
+ M.$on(E.value + "-scanDone", (e3) => {
43
+ E.value, JSON.stringify(e3), pe(e3.result), _(e3.result, z.pageContext, z.configure, "afterScanDone");
44
+ }), l(() => {
44
45
  var _a2;
45
46
  const e3 = U.value;
46
- S(e3, N.pageContext, N.configure, { formItemRef: W.value, componentRef: G.value, titleRef: H.value, value: e3, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page }), le.value && ((_a2 = Q.value.scan) == null ? void 0 : _a2.autoOpen) && ce();
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
- z.$off(E.value + "-scanDone");
50
+ M.$off(E.value + "-scanDone");
50
51
  });
51
- const pe = t(false);
52
+ const se = t(false);
52
53
  function ce() {
53
- if (te || Y) {
54
- const e3 = { type: "scan", componentId: E.value, systemCode: N.pageContext.systemCode };
55
- Y && (e3.type = "dingTalkScan"), window.parent.postMessage(JSON.stringify(e3), "*");
56
- } else if ($.value) if ("https:" === window.location.protocol) pe.value = true;
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: N.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 se(e3) {
64
- pe.value = false, re(e3);
64
+ function ve(e3) {
65
+ se.value = false, pe(e3);
65
66
  }
66
- return M2({ getValue: function() {
67
- return b(B, J);
68
- }, setValue: re, scanClick: ce }), (e3, t2) => {
69
- const l2 = i("el-input"), o2 = i("scan-code-input-browser"), n2 = i("el-form-item");
70
- return p(), r(n2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: s(v(ae)), "label-width": Q.value.labelWidth, style: c(v(ne)) }, { label: f(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: c({ ...v(ue), ...v(ie) }) }, [Q.value.prefixType ? (p(), r(P, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(v(L)(Q.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(l2, { 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: F.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] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "blur")), 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")) }, m({ _: 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), d(" " + x(v(L)(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), d(" " + x(v(L)(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), d(" " + x(v(L)(Q.value.sufText)), 1)]), key: "2" } : void 0, le.value || "outer" == Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "append", fn: f(() => [le.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), d(" " + x(v(L)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), pe.value ? (p(), r(o2, { key: 0, onClose: se })) : g("", 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] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "blur")), 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"]);
71
72
  };
72
73
  } });
73
74
  export {
74
- M as default
75
+ q as default
75
76
  };